Sha256: 48fa2fcbf8c3c146df952bd27faf963e6090b0be440d222d79a462f1e28e07eb
Contents?: true
Size: 707 Bytes
Versions: 7
Compression:
Stored size: 707 Bytes
Contents
FactoryGirl.define do factory :base_shipping_method, class: Spree::ShippingMethod do zones { |a| [Spree::Zone.global] } name 'UPS Ground' before(:create) do |shipping_method, evaluator| if shipping_method.shipping_categories.empty? shipping_method.shipping_categories << (Spree::ShippingCategory.first || create(:shipping_category)) end end factory :shipping_method, class: Spree::ShippingMethod do association(:calculator, factory: :shipping_calculator, strategy: :build) end factory :free_shipping_method, class: Spree::ShippingMethod do association(:calculator, factory: :shipping_no_amount_calculator, strategy: :build) end end end
Version data entries
7 entries across 7 versions & 1 rubygems