Skip to content

Commit 5120f61

Browse files
hdabrowskrainboltgreene
authored andcommitted
Don't eject cassettes on UnhandledHTTPRequestError (vcr#555)
VCR.cassettes was once private but is now public so this code can be removed. Ejecting the cassettes is generally harmless but causes any subsequent network requests to fail (e.g. in RSpec after hooks).
1 parent 6908cc9 commit 5120f61

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

lib/vcr/errors.rb

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -88,18 +88,7 @@ def construct_message
8888
end
8989

9090
def current_cassettes
91-
@cassettes ||= begin
92-
cassettes = VCR.cassettes.to_a.reverse
93-
94-
begin
95-
loop do
96-
break unless VCR.eject_cassette
97-
end
98-
rescue EjectLinkedCassetteError
99-
end
100-
101-
cassettes
102-
end
91+
@cassettes ||= VCR.cassettes.to_a.reverse
10392
end
10493

10594
def request_description

0 commit comments

Comments
 (0)