Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

mhuntglickman
Copy link
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
@@ -243,7 +243,11 @@ def should_re_record?
if !value
log "Not re-recording since the interval has not elapsed (#{info})."
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
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