Modified the specs, due to incosistency in the error messages in JRuby https://github.com/jruby/jruby/issues/1907