зеркало из https://github.com/github/ruby.git
Fix `bin/rake spec:realworld:record`
Previously it was failing and not recording. Also, the `BUNDLER_SPEC_FORCE_RECORD` environment variable was forcing every request to be recorded, including duplicated requests to the same endpoint. That meant the recorded `versions` file would be incorrect because it would contain the result of the last request, which would be `304 NOT MODIFIED`. So, to rerecord, delete cassettes and let them be recorded when needed.
This commit is contained in:
Родитель
0ae5cd55e5
Коммит
0fb2a7fa1c
|
@ -31,7 +31,6 @@ 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
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче