mirror of
https://github.com/DatabaseCleaner/database_cleaner
synced 2023-03-27 23:22:03 -04:00
23 lines
739 B
Ruby
23 lines
739 B
Ruby
When /^I create a widget using mongoid$/ do
|
|
MongoidWidget.create!( :id => rand(1000)+1000)
|
|
end
|
|
|
|
Then /^I should see ([\d]+) widget using mongoid$/ do |widget_count|
|
|
expect(MongoidWidget.count).to eq widget_count.to_i
|
|
end
|
|
|
|
When /^I create a widget in one db using mongoid$/ do
|
|
MongoidWidgetUsingDatabaseOne.create!
|
|
end
|
|
|
|
When /^I create a widget in another db using mongoid$/ do
|
|
MongoidWidgetUsingDatabaseTwo.create!
|
|
end
|
|
|
|
Then /^I should see ([\d]+) widget in one db using mongoid$/ do |widget_count|
|
|
expect(MongoidWidgetUsingDatabaseOne.count).to eq widget_count.to_i
|
|
end
|
|
|
|
Then /^I should see ([\d]+) widget in another db using mongoid$/ do |widget_count|
|
|
expect(MongoidWidgetUsingDatabaseTwo.count).to eq widget_count.to_i
|
|
end
|