Adapted warning specific code.

- Setting instance variables to nil instead of using instance_variable_defined?.
- Use minitest ~> 5.0, defined in gemspec.