summaryrefslogtreecommitdiff
path: root/spec/support/artifice
diff options
context:
space:
mode:
authorSamuel Giddins <segiddins@segiddins.me>2017-04-30 10:38:48 +0200
committerSamuel Giddins <segiddins@segiddins.me>2017-06-13 11:12:23 -0500
commit7cc28a11d8bd38d0e3a87879bdd19e2a2e34ebbc (patch)
treee25bc61202c153ec28e98b37067c2aa1b6392f62 /spec/support/artifice
parent3871bd602e2d8db3eb21e554ea60157e464df7d9 (diff)
downloadbundler-7cc28a11d8bd38d0e3a87879bdd19e2a2e34ebbc.tar.gz
[Rakefile] Allow re-recording all VCR cassettes
Diffstat (limited to 'spec/support/artifice')
-rw-r--r--spec/support/artifice/vcr.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/spec/support/artifice/vcr.rb b/spec/support/artifice/vcr.rb
index 3d0c2c6dd6..9db0053e6c 100644
--- a/spec/support/artifice/vcr.rb
+++ b/spec/support/artifice/vcr.rb
@@ -36,6 +36,7 @@ class BundlerVCRHTTP < Net::HTTP
def recorded_response?
return true if ENV["BUNDLER_SPEC_PRE_RECORDED"]
+ return false if ENV["BUNDLER_SPEC_FORCE_RECORD"]
request_pair_paths.all? {|f| File.exist?(f) }
end
@@ -77,7 +78,7 @@ class BundlerVCRHTTP < Net::HTTP
end
def request_pair_paths
- %w(request response).map do |kind|
+ %w[request response].map do |kind|
File.join(CASSETTE_PATH, CASSETTE_NAME, file_name_for_key(key + [kind]))
end
end