Skip to content

Commit

Permalink
Checkout steps and default data are useful for all cucumber scenarios
Browse files Browse the repository at this point in the history
  • Loading branch information
drogus authored and schof committed Jan 10, 2011
1 parent 9d34383 commit 88cccdb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Expand Up @@ -30,7 +30,7 @@
When %{I press "Add To Cart"}
end

When /^I choose "(.*?)" as shipping method and "(.*?)" as payment method$/ do |shiping_method, payment_method|
When /^I choose "(.*?)" as shipping method and "(.*?)" as payment method$/ do |shipping_method, payment_method|
# TODO: remove next line after fixing capybara's find by label feature
shipping_method = "order_shipping_method_id_#{ShippingMethod.find_by_name(shipping_method).id}"
When %{I choose "#{shipping_method}"}
Expand Down
Expand Up @@ -2,10 +2,10 @@

# load default data for tests
require 'active_record/fixtures'
fixtures_dir = File.expand_path('../../../db/default', __FILE__)
fixtures_dir = File.expand_path('../../../core/db/default', __FILE__)
Fixtures.create_fixtures(fixtures_dir, ['countries', 'zones', 'zone_members', 'states', 'roles'])
Fabricate(:shipping_method, :name => "UPS Ground")
Fabricate(:payment_method_check, :name => "Check")

# use transactions for faster tests
DatabaseCleaner.strategy = :transaction
#DatabaseCleaner.strategy = :transaction

0 comments on commit 88cccdb

Please sign in to comment.