Skip to content

To know what cassete file the current example is using

Fabio Perrella edited this page Aug 23, 2017 · 2 revisions

Add puts VCR.current_cassette.file into your it, for example:

it 'returns 2', :vcr do
  # any code...
  puts VCR.current_cassette.file
  
  expect(result).to eq(2)
end

That will print the file path, for example: /home/fabio/project-x/spec/fixtures/vcr_cassettes/feed_processor/deactivations_controller_post_deactivate_it_should_behave_like_integrated_feed_processor_lifecycle_post_deactivate_when_plan_has_no_feature_creates_a_bundle_for_plan.yml

This is very helpful when trying to find what cassette file is being used in a shared example!