WebMock v1.6.0 Release Notes
-
โ Simplified integration with Test::Unit, RSpec and Cucumber. Now only a single file has to be required i.e.
require 'webmock/test_unit' require 'webmock/rspec' require 'webmock/cucumber'
The error message on unstubbed request now contains code snippet which can be used to stub this request. Thanks to Martyn Loughran for suggesting this feature.
The expectation failure message now contains a list of made requests. Thanks to Martyn Loughran for suggesting this feature.
Added
WebMock.print_executed_requests
method which can be useful to find out what requests were made until a given point.em-http-request adapter is now activated by replacing EventMachine::HttpRequest constant, instead of monkeypatching the original class.
This technique is borrowed from em-http-request native mocking module. It allows switching WebMock adapter on an off, and using it interchangeably with em-http-request native mocking i.e:
EventMachine::WebMockHttpRequest.activate! EventMachine::WebMockHttpRequest.deactivate! Thanks to Martyn Loughran for suggesting this feature.
๐
WebMock.reset_webmock
is deprecated in favour of newWebMock.reset!
๐ Fixed integration with Cucumber. Previously documented example didn't work with new versions of Cucumber.
๐ Fixed stubbing requests with body declared as a hash. Thanks to Erik Michaels-Ober for reporting the issue.
๐ Fixed issue with em-http-request adapter which didn't work when :query option value was passed as a string, not a hash. Thanks to Chee Yeo for reporting the issue.
๐ Fixed problem with assert_requested which didn't work if used outside rspec or test/unit
โ Removed dependency on json gem