Sha256: 46133a9e117a2de3d890b43f0c0482066519d7603d0c506cd08b49ff445ad281

Contents?: true

Size: 1.18 KB

Versions: 66

Compression:

Stored size: 1.18 KB

Contents

Given /^I have setup database cleaner to clean multiple databases using datamapper$/ 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 datamapper$/ do
  DataMapperWidget.create!
end

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

When /^I create a widget in one db using datamapper$/ do
  begin
    DataMapperWidgetUsingDatabaseOne.create!
  rescue StandardError => e
    BREAK = e.backtrace
    debugger
    DataMapperWidgetUsingDatabaseOne.create!
  end
end

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

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

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

Version data entries

66 entries across 55 versions & 8 rubygems

Version Path
sunrise-cms-0.3.0 vendor/bundle/ruby/1.9.1/gems/database_cleaner-0.7.2/examples/features/step_definitions/datamapper_steps.rb
sunrise-cms-0.3.0 vendor/bundle/ruby/1.9.1/gems/rails-uploader-0.0.1/vendor/bundle/ruby/1.9.1/gems/database_cleaner-0.7.2/examples/features/step_definitions/datamapper_steps.rb
rails-uploader-0.0.4 vendor/bundle/ruby/1.9.1/gems/database_cleaner-0.8.0/examples/features/step_definitions/datamapper_steps.rb
rails-uploader-0.0.4 vendor/bundle/ruby/1.9.1/gems/database_cleaner-0.7.2/examples/features/step_definitions/datamapper_steps.rb
database_cleaner-0.8.0 examples/features/step_definitions/datamapper_steps.rb
sunrise-cms-0.3.0.rc vendor/bundle/ruby/1.9.1/gems/database_cleaner-0.7.2/examples/features/step_definitions/datamapper_steps.rb
sunrise-cms-0.3.0.rc vendor/bundle/ruby/1.9.1/gems/rails-uploader-0.0.1/vendor/bundle/ruby/1.9.1/gems/database_cleaner-0.7.2/examples/features/step_definitions/datamapper_steps.rb
rails-uploader-0.0.1 vendor/bundle/ruby/1.9.1/gems/database_cleaner-0.7.2/examples/features/step_definitions/datamapper_steps.rb
database_cleaner-0.7.2 examples/features/step_definitions/datamapper_steps.rb
radiant-1.0.0 ruby-debug/ruby/1.8/gems/database_cleaner-0.6.7/examples/features/step_definitions/datamapper_steps.rb
database_cleaner-0.7.1 examples/features/step_definitions/datamapper_steps.rb
database_cleaner-0.7.0 examples/features/step_definitions/datamapper_steps.rb
database_cleaner-0.6.7 examples/features/step_definitions/datamapper_steps.rb
database_cleaner-0.6.7.RC examples/features/step_definitions/datamapper_steps.rb
database_cleaner-0.6.6 examples/features/step_definitions/datamapper_steps.rb
database_cleaner-0.6.5 examples/features/step_definitions/datamapper_steps.rb
database_cleaner-0.6.4 examples/features/step_definitions/datamapper_steps.rb
database_cleaner-0.6.3 examples/features/step_definitions/datamapper_steps.rb
database_cleaner-0.6.2 examples/features/step_definitions/datamapper_steps.rb
database_cleaner-0.6.1 examples/features/step_definitions/datamapper_steps.rb