Skip to content

Instantly share code, notes, and snippets.

@3den
Created January 3, 2012 23:38
Show Gist options
  • Save 3den/1557591 to your computer and use it in GitHub Desktop.
Save 3den/1557591 to your computer and use it in GitHub Desktop.
add VRC to all remote calls automatically
RSpec.configure do |config|
# Add VCR to all tests
config.around(:each) do |example|
name = example.metadata[:full_description].split(/\s+/, 2).join("/").underscore.gsub(/[^\w\/]+/, "_")
options = example.metadata[:vcr] || {}
VCR.use_cassette(name, options, &example)
end
end
@myronmarston
Copy link

That's a VCR bug we should fix then. Can you file an issue on the VCR issue tracker? It would be really helpful to have the backtrace and a small reproducible example (or access to a project that triggers this error). I've not gotten that error before so your code must be exercising some edge case that mine is not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment