-
-
Notifications
You must be signed in to change notification settings - Fork 327
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
Cucumber::Rails::Database.javascript_strategy is too simple #537
Comments
Reproduction https://github.com/jherdman/cucumber-rails-database-cleaner-repro. Simply running I think my ideal world would be the total elimination of the default JavaScript strategy. We already have the ability to do before/after/around hooks using tags for |
Should anyone find this and need a work around you can simply "alias" the deletion strategy as truncation as follows: module DatabaseCleaner
module Redis
Truncation = Deletion
end
end |
Instead of removing the default strategy, how would you feel if instead the default was set to the new This would be much easier to do (Yes it would still be a breaking change). But it would be a trivial task as opposed to a bigger task. |
Perhaps simply offering a |
So we have a new null strategy. But this must be configured. However this still cannot be default set (We forcibly set the default as you are seeing). What I'm proposing is not removing the forcible setting, but instead forcibly setting it to the NullStrategy. Which would be a trivial (breaking), change. This then in theory would not cause issues for yourself. I can make a sample branch if you would prefer to trial out the behaviour? |
That'd be great! |
I'll get something up by the end of the week. there's no guarantees this will fix your issue but we can see. We've been discussing doing a major release soon for some other small things, so the major release isn't really a concern. |
And I pushed this down the priority queue again :( I'll try get to this soon, or failing that if you do feel free. |
@jherdman given the lack of other commenting on here? I'm unsure if this is as important as originally mentioned. Is this still an issue for you? |
This is no longer an issue for me. Please feel free to close this issue if you feel that it's resolved to your satisfaction. |
It's something I don't think I have enough knowledge of to make a breaking change on. Is this no longer an issue because of the monkeypatch you have done? Or something else? |
I'm no longer working on the project where this caused the problems for me. |
π What did you see?
When
database_cleaner-redis
ANDdatabase_cleaner-active_record
are in play, I cannot correctly configure them for theCucumber::Rails::Database.javascript_strategy
. I'm forced to consolidate upon a single strategy.β What did you expect to see?
I am able to set the correct strategy for any given database cleaner adapter I'm using.
π¦ Which tool/library version are you using?
cucumber-rails v2.5.1
π¬ How could we reproduce it?
Steps to reproduce the behavior:
database_cleaner-active_record
anddatabase_cleaner-redis
features/support/env.rb
:π Any additional context?
This text was originally generated from a template, then edited by hand. You can modify the template here.
The text was updated successfully, but these errors were encountered: