-
-
Notifications
You must be signed in to change notification settings - Fork 328
Open
Description
π What did you see?
When database_cleaner-redis
AND database_cleaner-active_record
are in play, I cannot correctly configure them for the Cucumber::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:
- Set up some Rails app with cucumber-rails, Redis, and database-cleaner with both
database_cleaner-active_record
anddatabase_cleaner-redis
- Add the following to
features/support/env.rb
:
# Remove/comment out the lines below if your app doesn't have a database.
# For some databases (like MongoDB and CouchDB) you may need to use :truncation instead.
begin
DatabaseCleaner[:active_record].strategy = :transaction
DatabaseCleaner[:redis].strategy = :deletion
rescue NameError
raise "You need to add database_cleaner to your Gemfile (in the :test group) if you wish to use it."
end
Before('@javascript') do
DatabaseCleaner[:redis].strategy = :deletion
end
- Run your Cucumber suite
- See error:
Using the default profile...
@javascript
Feature: Some feature
As an...
I want to...
So that....
Background: # features/something.feature:8
The 'truncation' strategy does not exist for the redis ORM! Available strategies: deletion (DatabaseCleaner::UnknownStrategySpecified)
π Any additional context?
This text was originally generated from a template, then edited by hand. You can modify the template here.
Metadata
Metadata
Assignees
Labels
No labels