Skip to content

Commit

Permalink
Added vcr to fakeweb to make it easier to record new tests
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterBell committed Jan 29, 2011
1 parent a8f3a89 commit f055021
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions spec/spec_helper.rb
Expand Up @@ -5,17 +5,20 @@
require 'rspec'
require 'autotest'
require 'fakeweb'
require 'vcr'

Rspec.configure do |config|

# don't allow any external connections
FakeWeb.allow_net_connect = true
config.extend VCR::RSpec::Macros

config.before(:each) do
FakeWeb.clean_registry
VCR.config do |c|
c.cassette_library_dir = 'vcr/cassettes'
c.stub_with :fakeweb
end

end


def fixture_file(filename)
file_path = File.expand_path(File.dirname(__FILE__) + "/fixtures/" + filename)
File.read(file_path)
Expand Down

0 comments on commit f055021

Please sign in to comment.