Skip to content

Commit

Permalink
Switch VCR record mode to :none
Browse files Browse the repository at this point in the history
This avoids recording cassettes when we run our tests in CI in case the PR author didn't already record them. This also helps us catch instances where the cassette itself might be poorly recorded; a test with the :vcr annotation can have its cassette change in subsequent runs if the test doesn't contain a description

This may reveal that we have other poorly recorded tests in our codebase
  • Loading branch information
Nishnha committed Aug 1, 2023
1 parent 4dd41de commit c39d7ab
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions common/spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,9 @@
end

# Let's you set default VCR mode with VCR=all for re-recording
# episodes. :once is VCR default
record_mode = ENV["VCR"] ? ENV["VCR"].to_sym : :once
# episodes. We use :none here to avoid recording new cassettes
# in CI if it doesn't already exist for a test
record_mode = ENV["VCR"] ? ENV["VCR"].to_sym : :none
config.default_cassette_options = { record: record_mode }
end

Expand Down

0 comments on commit c39d7ab

Please sign in to comment.