This gem allows to use VCR in development. This is quite handy when your app interacts frequently with external services and you're on a sloppy connection, or when you want to save bandwidth, or when you happent to have no connection at all.
Add required gems to your Gemfile:
gem 'vcr_cable'
gem 'webmock' # or fakewebNow all external requests will hit the remote servers only one time, and the application will subsequently use the recorded data.
The default VCR configuration values are (extracted from lib/vcr_cable.rb):
DEFAULT_CONFIG = {
'development' => {
'hook_into' => :fakeweb,
'cassette_library_dir' => 'development_cassettes',
'allow_http_connections_when_no_cassette' => true
}
}If you want to override those values you can generate the vcr_cable.yml config file and edit its params:
bundle exec rails generate vcr_cableYou will find the generated file in the config folder of your rails
application.
- Fork it
- Create your feature branch (
git checkout -b my-new-feature) - Add your feature tests to the rspec/cucumber test suite
- Commit your changes (
git commit -am 'Added some feature') - Push to the branch (
git push origin my-new-feature) - Create new Pull Request