You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the first try fails then all successive tries will also fail because the @message variable is only set on the first try and the repeated attempts will continue to use the previously set value.
This is unique to controller specs, which I realize are generally not recommended these days. A request spec for the same controller works as expected and a failure on the first run can be "fixed" by a subsequent run since the variable is "cleared out" between each retry.
If you have a controller like this:
And a controller test like this:
And run the test like this:
If the first try fails then all successive tries will also fail because the
@message
variable is only set on the first try and the repeated attempts will continue to use the previously set value.This is unique to controller specs, which I realize are generally not recommended these days. A request spec for the same controller works as expected and a failure on the first run can be "fixed" by a subsequent run since the variable is "cleared out" between each retry.
Here's a repo that demonstrates the problem: https://github.com/jagthedrummer/rspec_retry_test
The text was updated successfully, but these errors were encountered: