cirandas.net

ref: master

plugins/shopping_cart/features/step_definitions/delivery_steps.rb


1
2
3
4
5
6
7
Given /^"([^""]*)" has the following delivery methods$/ do |name, table|
  enterprise = Enterprise.find_by(name: name) || Enterprise[name]
  table.hashes.map{|item| item.dup}.each do |item|
    delivery_method = enterprise.delivery_methods.build
    delivery_method.update_attributes(item)
  end
end