Sha256: 77db917e9141adc2ac05892eafb471472f48d39c26252a40bda2ab14d7a13785

Contents?: true

Size: 1.12 KB

Versions: 4

Compression:

Stored size: 1.12 KB

Contents

Given /^I have setup database cleaner to clean multiple databases using activerecord$/ do
  #DatabaseCleaner
  # require "#{File.dirname(__FILE__)}/../../../lib/datamapper_models"
  #
  # DatabaseCleaner[:datamapper, {:connection => :one} ].strategy = :truncation
  # DatabaseCleaner[:datamapper, {:connection => :two} ].strategy = :truncation
end

When /^I create a widget using activerecord$/ do
  ActiveRecordWidget.create!
end

Then /^I should see ([\d]+) widget using activerecord$/ do |widget_count|
  ActiveRecordWidget.count.should == widget_count.to_i
end

When /^I create a widget in one db using activerecord$/ do
  ActiveRecordWidgetUsingDatabaseOne.create!
end

When /^I create a widget in another db using activerecord$/ do
  ActiveRecordWidgetUsingDatabaseTwo.create!
end

Then /^I should see ([\d]+) widget in one db using activerecord$/ do |widget_count|
  ActiveRecordWidgetUsingDatabaseOne.count.should == widget_count.to_i
end

Then /^I should see ([\d]+) widget in another db using activerecord$/ do |widget_count|
  ActiveRecordWidgetUsingDatabaseTwo.count.should == widget_count.to_i
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
surgical_strike-0.7.7 examples/features/step_definitions/activerecord_steps.rb
surgical_strike-0.7.6 examples/features/step_definitions/activerecord_steps.rb
surgical_strike-0.7.5 examples/features/step_definitions/activerecord_steps.rb
surgical_strike-0.7.4 examples/features/step_definitions/activerecord_steps.rb