Sha256: 3c60463ebdf01788580d38b44a275f42c8bf8dec6c4a6f9aae98c06db77a14b5
Contents?: true
Size: 542 Bytes
Versions: 19
Compression:
Stored size: 542 Bytes
Contents
FactoryGirl.define do factory :tax_category, :class => Spree::TaxCategory do name { "TaxCategory - #{rand(999999)}" } description { Faker::Lorem.sentence } end factory :tax_category_with_rates, :parent => :tax_category do after_create do |tax_category| tax_category.tax_rates.create!({ :amount => 0.05, :calculator => Spree::Calculator::DefaultTax.new, :zone => Spree::Zone.find_by_name('GlobalZone') || FactoryGirl.create(:global_zone) }, :without_protection => true) end end end
Version data entries
19 entries across 19 versions & 2 rubygems