2020-04-26 20:58:22 -04:00
|
|
|
orms_pattern = /(ActiveRecord|Redis)/
|
2010-05-16 16:44:09 -04:00
|
|
|
|
2020-04-05 15:05:02 -04:00
|
|
|
Given /^I am using #{orms_pattern} from its adapter gem$/ do |orm|
|
2010-05-16 16:44:09 -04:00
|
|
|
@feature_runner = FeatureRunner.new
|
|
|
|
@feature_runner.orm = orm
|
|
|
|
end
|
|
|
|
|
2020-04-05 15:05:02 -04:00
|
|
|
Given /^I am using #{orms_pattern} and #{orms_pattern} from their adapter gems$/ do |orm1, orm2|
|
2010-05-16 16:44:09 -04:00
|
|
|
@feature_runner = FeatureRunner.new
|
|
|
|
@feature_runner.orm = orm1
|
|
|
|
@feature_runner.another_orm = orm2
|
2009-03-03 23:53:21 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
Given /^the (.+) cleaning strategy$/ do |strategy|
|
2010-05-16 16:44:09 -04:00
|
|
|
@feature_runner.strategy = strategy
|
2009-03-03 23:53:21 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
When "I run my scenarios that rely on a clean database" do
|
2010-05-16 16:44:09 -04:00
|
|
|
@feature_runner.go 'example'
|
2009-03-03 23:53:21 -05:00
|
|
|
end
|
|
|
|
|
2010-05-16 16:55:43 -04:00
|
|
|
When "I run my scenarios that rely on clean databases" do
|
2010-05-25 13:21:45 -04:00
|
|
|
@feature_runner.multiple_databases = true
|
2010-05-16 16:55:43 -04:00
|
|
|
@feature_runner.go 'example_multiple_db'
|
2009-03-03 23:53:21 -05:00
|
|
|
end
|
|
|
|
|
2010-05-16 16:44:09 -04:00
|
|
|
When "I run my scenarios that rely on clean databases using multiple orms" do
|
2010-05-16 16:56:26 -04:00
|
|
|
@feature_runner.go 'example_multiple_orm'
|
2010-05-16 16:44:09 -04:00
|
|
|
end
|
2009-03-03 23:53:21 -05:00
|
|
|
|
2010-05-16 16:44:09 -04:00
|
|
|
Then "I should see all green" do
|
|
|
|
fail "Feature failed with :#{@feature_runner.output}" unless @feature_runner.exit_status == 0
|
2010-05-30 23:12:58 -04:00
|
|
|
end
|