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 new WebMock.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