Permalink
Browse files

Don't store a :stubbed_by_vcr request type on the request for Fakeweb

  • Loading branch information...
1 parent a48c27d commit d465d9f840c444e50da83af415672766f395b6ca @Jacobkg Jacobkg committed Jul 3, 2012
Showing with 2 additions and 2 deletions.
  1. +1 −1 lib/vcr/library_hooks/fakeweb.rb
  2. +1 −1 spec/vcr/library_hooks/fakeweb_spec.rb
View
2 lib/vcr/library_hooks/fakeweb.rb
@@ -49,7 +49,7 @@ def request_type(*args)
end
def set_typed_request_for_after_hook(request_type)
- @request.instance_variable_set(:@__vcr_request_type, request_type)
+ @request.instance_variable_set(:@__vcr_request_type, request_type) unless request_type == :stubbed_by_vcr
super
end
View
2 spec/vcr/library_hooks/fakeweb_spec.rb
@@ -95,7 +95,7 @@ def make_post_request
ignored_body.should_not eq(recorded_body)
ignored_body.should match(/Response \d+/)
end
-
+
it "Make request twice against cassette using the same http request object" do
uri = URI.parse("http://localhost:#{VCR::SinatraApp.port}/foo")
http = Net::HTTP.new(uri.host, uri.port)

0 comments on commit d465d9f

Please sign in to comment.