From c39d7ab60071e8340f8098fb240d94e78ff7023e Mon Sep 17 00:00:00 2001 From: Nish Sinha Date: Wed, 9 Mar 2022 16:43:58 -0500 Subject: [PATCH] Switch VCR record mode to :none 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 --- common/spec/spec_helper.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/common/spec/spec_helper.rb b/common/spec/spec_helper.rb index f0497e9e3f1e..6343aa735f30 100644 --- a/common/spec/spec_helper.rb +++ b/common/spec/spec_helper.rb @@ -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