Created
March 21, 2013 16:02
-
-
Save opsb/5214214 to your computer and use it in GitHub Desktop.
VCR config for spinach
This file contains hidden or 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
| VCR.config do |c| | |
| c.cassette_library_dir = 'features/vcr_cassettes' | |
| end | |
| Spinach.hooks.before_scenario do |scenario| | |
| cassette_name = "#{scenario.feature.name.parameterize.underscore}/#{scenario.name.parameterize.underscore}" | |
| VCR.insert_cassette(cassette_name, :record => :once) | |
| end | |
| Spinach.hooks.after_scenario do |scenario| | |
| VCR.eject_cassette | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment