Sha256: b3b3c2f02d10f4078219787cb34b765a4c2417d68de9d4e70182eeb9f98c76aa
Contents?: true
Size: 689 Bytes
Versions: 32
Compression:
Stored size: 689 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: :calculator, strategy: :build) end factory :free_shipping_method, class: Spree::ShippingMethod do association(:calculator, factory: :no_amount_calculator, strategy: :build) end end end
Version data entries
32 entries across 32 versions & 1 rubygems