Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Updated Changelog and README with info about enabling and disabling W…

…ebMock with WebMock.enable! and WebMock.disable!
  • Loading branch information...
commit 17547a564a9ae81eb2e41f495002f02f8a854e30 1 parent 7c930d1
@bblimke authored
Showing with 14 additions and 0 deletions.
  1. +7 −0 CHANGELOG.md
  2. +7 −0 README.md
View
7 CHANGELOG.md
@@ -32,6 +32,13 @@
Thanks to [Jay Adkisson](https://github.com/jayferd)
+* Added support for selective disabling and enabling of http client adapters
+
+ WebMock.disable! #disable WebMock (all adapters)
+ WebMock.disable!(:except => [:net_http]) #disable all adapters except Net::HTTP
+ WebMock.enable! #enable WebMock (all adapters)
+ WebMock.enable!(:except => [:patron]) #enable all adapters except Patron
+
* The error message on an unstubbed request shows a code snippet with body as a hash when it was in url encoded form. Thanks to [Alex Rothenberg](https://github.com/alexrothenberg)
* The error message on an unstubbed request shows currently registered request stubs.
View
7 README.md
@@ -429,6 +429,13 @@ If you want to reset all current stubs and history of requests use `WebMock.rese
assert_not_requested :get, "www.example.com" # ===> Success
+## Disabling and enabling WebMock or only some http client adapters
+
+ WebMock.disable! #disable WebMock (all adapters)
+ WebMock.disable!(:except => [:net_http]) #disable all adapters except Net::HTTP
+ WebMock.enable! #enable WebMock (all adapters)
+ WebMock.enable!(:except => [:patron]) #enable all adapters except Patron
+
## Matching requests
Please sign in to comment.
Something went wrong with that request. Please try again.