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:
David Rodríguez 2020-05-24 11:20:02 +02:00 коммит произвёл Hiroshi SHIBATA
Родитель 0ae5cd55e5
Коммит 0fb2a7fa1c
1 изменённых файлов: 0 добавлений и 1 удалений

Просмотреть файл

@ -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