gems webmock 3.31.0

latest release: 3.32.0
5 hours ago
  • Return the contents of a File or Pathname body given to to_return_json, or returned by its body lambda, instead of encoding the object as a JSON string (#1119)

    The file is read and closed as it is for to_return: when the stub is declared, or on each request when it comes from a lambda.

    Thanks to Alex

  • Match HTTP methods given as a string or in upper case, as in stub_request("get", ...), a_request("GET", ...) or assert_requested("post", ...) (#821)

    Before, such a method never matched, so the stub never applied and negative expectations like assert_not_requested("get", ...) always passed. A test that passed only because of this can now fail.

    The method of a request is now always a lower case Symbol too. A request made with an upper case method, as Typhoeus does with method: :POST, now matches a :post stub, and callbacks and with blocks see :post.

    Thanks to Euisan Kim

Don't miss a new webmock release

NewReleases is sending notifications on new releases.