Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Set the global settings in before/after blocks to allow specs to pass…

…. I guess these settings were set by luck before, because I wasn't getting the failures I'm getting now.
  • Loading branch information...
commit 29b821841b1528164bb2673b3e76f11fb5461dae 1 parent 165e475
@myronmarston authored
Showing with 18 additions and 0 deletions.
  1. +9 −0 spec/cassette_spec.rb
  2. +9 −0 spec/net_http_extensions_spec.rb
View
9 spec/cassette_spec.rb
@@ -1,6 +1,15 @@
require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
describe VCR::Cassette do
+ before(:all) do
+ @orig_default_cassette_record_mode = VCR::Config.default_cassette_record_mode
+ VCR::Config.default_cassette_record_mode = :unregistered
+ end
+
+ after(:all) do
+ VCR::Config.default_cassette_record_mode = :unregistered
+ end
+
before(:each) do
FakeWeb.clean_registry
end
View
9 spec/net_http_extensions_spec.rb
@@ -1,6 +1,15 @@
require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
describe "NetHttpExtensions" do
+ before(:all) do
+ @orig_allow_net_connect = FakeWeb.allow_net_connect?
+ FakeWeb.allow_net_connect = true
+ end
+
+ after(:all) do
+ FakeWeb.allow_net_connect = @orig_allow_net_connect
+ end
+
before(:each) do
@current_cassette = mock
VCR.stub!(:current_cassette).and_return(@current_cassette)
Please sign in to comment.
Something went wrong with that request. Please try again.