Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Use EphemeralResponse debugging on fixture save

  • Loading branch information...
commit 78eb87c3372b7a13bef3abc5ad529810fea3306a 1 parent 648b703
Les Hill and Sandro Turriate authored Pairing Workstation Leela committed
View
1  lib/ephemeral_response/fixture.rb
@@ -96,6 +96,7 @@ def path
def register
unless Configuration.white_list.include? uri.host
+ EphemeralResponse::Configuration.debug_output.puts "EphemeralResponse: saving #{request.method} request to #{uri}"
save
self.class.register self
end
View
1  lib/ephemeral_response/net_http.rb
@@ -10,7 +10,6 @@ def connect
private :connect
def do_start_with_ephemeral_response
- D "EphemeralResponse: establishing connection to #{uri}"
connect_without_ephemeral_response
@started = true
end
View
5 spec/ephemeral_response/fixture_spec.rb
@@ -321,6 +321,11 @@
fixture.register
EphemeralResponse::Fixture.fixtures.should have_key(fixture.identifier)
end
+
+ it "debugs saving the fixture" do
+ EphemeralResponse::Configuration.debug_output.should_receive(:puts).with(/saving GET request to http:\/\/example.com/)
+ fixture.register
+ end
end
context "uri is white listed" do
Please sign in to comment.
Something went wrong with that request. Please try again.