Created
September 21, 2009 03:35
-
-
Save mbleigh/190050 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'fakeweb' | |
FakeWeb.allow_net_connect = false | |
class SomethingThatUsesNetHTTP | |
def self.some_http_method | |
# => does hidden-away HTTP stuff | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> SomethingThatUsesNetHTTP.some_http_method | |
FakeWeb::NetConnectNotAllowedError: Real HTTP connections are disabled. | |
Unregistered request: GET http://some.url.here |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment