Skip to content

Fix #734: Add fail_on_re_record option, to raise an exception when cassette re-recorded#768

Open
mhuntglickman wants to merge 2 commits into
vcr:masterfrom
mhuntglickman:master
Open

Fix #734: Add fail_on_re_record option, to raise an exception when cassette re-recorded#768
mhuntglickman wants to merge 2 commits into
vcr:masterfrom
mhuntglickman:master

Conversation

@mhuntglickman
Copy link
Copy Markdown
Contributor

@mhuntglickman mhuntglickman commented Sep 14, 2019

Adds a new option fail_on_re_record, which raises a runtime error when a cassette is re-recorded.

Fixes #734

@olleolleolle olleolleolle changed the title PR #734: Option to raise an exception when cassette re-recorded Fix #734: Add fail_on_re_record option, to raise an exception when cassette re-recorded Dec 20, 2019
Comment thread lib/vcr/cassette.rb
elsif InternetConnection.available?
log "re-recording (#{info})."
if @fail_on_re_record
raise RuntimeError.new("Beyond record interval. Please re_record your cassette and commit them.")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
raise RuntimeError.new("Beyond record interval. Please re_record your cassette and commit them.")
raise RuntimeError.new("The re-record interval has passed, please re_record your cassettes.")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Option to raise an exception when a cassette needs to be re-recorded

3 participants