Remove warnings for test suite

I removed following warnings.

* warning: mismatched indentations at 'end' with 'class' at xxx
* warning: method redefined; discarding old xxx
* warning: assigned but unused variable xxx
* warning: previous definition of xxx was here
* The source :rubygems is deprecated because HTTP requests are insecure. (Gemfile)