Fix rspec 3 error with jruby

I think this fixes the error in travis CI.