Sha256: be7aabc60d0b9e6de425f35959b221ae1d168dc7304a88e6ecbca7da76d04ef9
Contents?: true
Size: 751 Bytes
Versions: 9
Compression:
Stored size: 751 Bytes
Contents
FactoryGirl.define do factory :base_shipping_method, class: Spree::ShippingMethod do zones { |a| [Spree::Zone.global] } name 'UPS Ground' code 'UPS_GROUND' display_on 'both' 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
9 entries across 9 versions & 1 rubygems