Created
August 10, 2012 09:37
-
-
Save josepjaume/3312970 to your computer and use it in GitHub Desktop.
Spinach and VCR
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gem 'webmock' | |
gem 'vcr' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# features/support/vcr.rb | |
VCR.configure do |c| | |
c.default_cassette_options = {record: :new_episodes} | |
c.cassette_library_dir = 'fixtures/vcr_cassettes' | |
c.hook_into :webmock | |
c.ignore_localhost = true | |
end | |
Spinach.hooks.before_scenario do |scenario| | |
VCR.insert_cassette(scenario.name.parameterize) | |
end | |
Spinach.hooks.after_scenario do | |
VCR.eject_cassette | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
+1