fix tests for ruby 2
fix tests on ruby 2