Skip to content

Commit

Permalink
Failing test for reusing net/http request in Fakeweb
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacob Green authored and myronmarston committed Jul 10, 2012
1 parent dfda4cd commit 498994a
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions spec/vcr/library_hooks/fakeweb_spec.rb
Expand Up @@ -95,6 +95,21 @@ 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)
VCR.use_cassette("new_cassette", :record => :once) do
request = Net::HTTP::Get.new(uri.request_uri)
http.request(request)
end

VCR.use_cassette("new_cassette", :record => :once) do
request = Net::HTTP::Get.new(uri.request_uri)
http.request(request)
http.request(request)
end
end
end

describe "VCR.configuration.after_library_hooks_loaded hook" do
Expand Down

0 comments on commit 498994a

Please sign in to comment.