test/test_helper.rb in nephophobia-0.3.0 vs test/test_helper.rb in nephophobia-0.3.6
- old
+ new
@@ -6,21 +6,28 @@
require "minitest/spec"
require "nokogiri"
require "vcr"
class MiniTest::Unit::TestCase
+ def wait seconds = 5
+ sleep seconds unless VCR.current_cassette.record_mode == :none
+ end
+
def cassette_for cassette, interaction = 0
c = VCR::Cassette.new(cassette).send :recorded_interactions
VCR.eject_cassette
Nokogiri::XML::Document.parse c[interaction].response.body
end
end
VCR.config do |c|
c.stub_with :fakeweb
+
c.cassette_library_dir = "test/cassettes"
c.default_cassette_options = { :record => :none }
+
+ c.allow_http_connections_when_no_cassette = true
end
class Client
def self.with type, options = {}
client_options = case type