spec/vcr/library_hooks/fakeweb_spec.rb in vcr-2.1.1 vs spec/vcr/library_hooks/fakeweb_spec.rb in vcr-2.2.0

- old
+ new

@@ -137,6 +137,17 @@ ::Net::HTTP.get_response(URI(request_url)) }.to raise_error(SocketError) end end end + + describe "when VCR is turned off" do + it 'allows white listed connections' do + ::FakeWeb.allow_net_connect = %r[localhost] + + VCR.turn_off! + + uri = URI("http://localhost:#{VCR::SinatraApp.port}/foo") + Net::HTTP.get(uri).should eq("FOO!") + end + end end