Skip to content

Commit

Permalink
Merge pull request oesmith#122 from springleaf/patch-1
Browse files Browse the repository at this point in the history
Added alternative to run VCR in parallel
  • Loading branch information
ronwsmith committed Aug 25, 2015
2 parents e97ca92 + 7e19e74 commit c04d6fc
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,20 @@ RSpec.configure do |config|
end
```

As an alternative if you're using VCR, you can ignore requests coming from the browser.
One way of doing that is by adding to your `rails_helper.rb` the excerpt below:

```ruby
VCR.configure do |config|
config.ignore_request do |request|
request.headers.include?('Referer')
end
end
```

Note that this approach may cause unexpected behavior if your backend sends the Referer HTTP header (which is unlikely).


## Resources

* [Bring Ruby VCR to Javascript testing with Capybara and puffing-billy](http://architects.dzone.com/articles/bring-ruby-vcr-javascript)
Expand Down

0 comments on commit c04d6fc

Please sign in to comment.