-
-
Notifications
You must be signed in to change notification settings - Fork 329
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
database cleaner; truncate not fully overriding transaction #153
Comments
This is happening because cucumber-rails is using a before hook in the library to call DatabaseCleaner.setup. This causes DatabaseCleaner.setup to be called before your hook to set the strategy, thus causing it to break because you must set the strategy before calling start. |
I'm not experiencing the problem now, and I'm assuming that I must have shuffled things around thus avoiding the situation you describe. Thanks for your comment! |
@tmiller This was not the case for me -- no call to DatabaseCleaner.setup... |
I believe this is fixed by #166. |
I have my default database cleaner strategy set to transaction, an before block setting it to truncation for @no-txn tagged features/scenarios and a bunch of features tagged @no-txn.
In my features/support/env.rb I have the following:
However, I'm running into failing scenarios because they are trying to rollback to savepoints that don't exist.
I do not run into the problem if I set the following:
We're using:
The text was updated successfully, but these errors were encountered: