2014-12-22 04:27:53 -05:00
|
|
|
orms_pattern = /(ActiveRecord|DataMapper|Sequel|MongoMapper|Mongoid|CouchPotato|Redis|Ohm|Neo4j)/
|
2010-05-16 16:44:09 -04:00
|
|
|
|
2013-05-11 09:16:01 -04:00
|
|
|
Given /^I am using #{orms_pattern}$/ do |orm|
|
2010-05-16 16:44:09 -04:00
|
|
|
@feature_runner = FeatureRunner.new
|
|
|
|
@feature_runner.orm = orm
|
|
|
|
end
|
|
|
|
|
2013-05-11 09:16:01 -04:00
|
|
|
Given /^I am using #{orms_pattern} and #{orms_pattern}$/ 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
|