Permalink
Browse files

Updated README with info about :allow with specified port number

  • Loading branch information...
1 parent 518c840 commit e1d431eab4669e2a52d346ee104dff8f74278de3 @bblimke committed Aug 9, 2011
Showing with 6 additions and 4 deletions.
  1. +6 −4 README.md
View
@@ -306,13 +306,15 @@ You can also use WebMock outside a test framework:
Net::HTTP.get('localhost:9887', '/') # ===> Allowed. Perhaps to Selenium?
-### External requests can be disabled while allowing any hostname
+### External requests can be disabled while allowing any hostname or port
- WebMock.disable_net_connect!(:allow => "www.example.org")
+ WebMock.disable_net_connect!(:allow => "www.example.org:8080")
- Net::HTTP.get('www.something.com', '/') # ===> Failure
+ RestClient.get('www.something.com', '/') # ===> Failure
+
+ RestClient.get('www.example.org', '/') # ===> Failure.
- Net::HTTP.get('www.example.org', '/') # ===> Allowed.
+ RestClient.get('www.example.org:8080', '/') # ===> Allowed
## Connecting on Net::HTTP.start

0 comments on commit e1d431e

Please sign in to comment.