Bug #28417
closedmocha 1.10 break tests
Description
steps to reporduce:
run bundle exec rake test
1) Error:
HammerCLIForeman::ExceptionHandler#test_0010_should print resource errors on internal error exception:
NoMethodError: undefined method `code' for " {\"error\":{\"message\":\"Some internal exception\"}}\n":String
Did you mean? encode
/home/mshira/.rvm/gems/ruby-2.5.1/gems/rest-client-2.0.2/lib/restclient/exceptions.rb:123:in `http_code'
/home/mshira/.rvm/gems/ruby-2.5.1/gems/rest-client-2.0.2/lib/restclient/exceptions.rb:179:in `block (3 levels) in <module:RestClient>'
/home/mshira/.rvm/gems/ruby-2.5.1/gems/rest-client-2.0.2/lib/restclient/exceptions.rb:142:in `message'
/home/mshira/.rvm/gems/ruby-2.5.1/gems/rest-client-2.0.2/lib/restclient/exceptions.rb:162:in `to_s'
/home/mshira/.rvm/gems/ruby-2.5.1/gems/mocha-1.10.1/lib/mocha/inspect.rb:9:in `inspect'
/home/mshira/.rvm/gems/ruby-2.5.1/gems/mocha-1.10.1/lib/mocha/inspect.rb:9:in `mocha_inspect'
/home/mshira/.rvm/gems/ruby-2.5.1/gems/mocha-1.10.1/lib/mocha/mockery.rb:130:in `on_stubbing'
/home/mshira/.rvm/gems/ruby-2.5.1/gems/mocha-1.10.1/lib/mocha/object_methods.rb:129:in `block in stubs'
/home/mshira/.rvm/gems/ruby-2.5.1/gems/mocha-1.10.1/lib/mocha/argument_iterator.rb:13:in `each'
/home/mshira/.rvm/gems/ruby-2.5.1/gems/mocha-1.10.1/lib/mocha/object_methods.rb:127:in `stubs'
/home/mshira/git/hammer-cli-foreman/test/unit/exception_handler_test.rb:95:in `block (2 levels) in <top (required)>'