Sha256: 175b56a518f47f11e052ab86f92322fe3706d274aa3cb6f639cd1bad2168dd17

Contents?: true

Size: 667 Bytes

Versions: 73

Compression:

Stored size: 667 Bytes

Contents

FactoryGirl.define do
  factory :calculator, class: Spree::Calculator::FlatRate do
    after(:create) { |c| c.set_preference(:amount, 10.0) }
  end

  factory :no_amount_calculator, class: Spree::Calculator::FlatRate do
    after(:create) { |c| c.set_preference(:amount, 0) }
  end

  factory :default_tax_calculator, class: Spree::Calculator::DefaultTax do
  end

  factory :shipping_calculator, class: Spree::Calculator::Shipping::FlatRate do
    after(:create) { |c| c.set_preference(:amount, 10.0) }
  end

  factory :shipping_no_amount_calculator, class: Spree::Calculator::Shipping::FlatRate do
    after(:create) { |c| c.set_preference(:amount, 0) }
  end
end

Version data entries

73 entries across 73 versions & 1 rubygems

Version Path
spree_core-3.1.14 lib/spree/testing_support/factories/calculator_factory.rb
spree_core-3.1.13 lib/spree/testing_support/factories/calculator_factory.rb
spree_core-3.3.4 lib/spree/testing_support/factories/calculator_factory.rb
spree_core-3.2.7 lib/spree/testing_support/factories/calculator_factory.rb
spree_core-3.1.12 lib/spree/testing_support/factories/calculator_factory.rb
spree_core-3.3.3 lib/spree/testing_support/factories/calculator_factory.rb
spree_core-3.2.6 lib/spree/testing_support/factories/calculator_factory.rb
spree_core-3.1.11 lib/spree/testing_support/factories/calculator_factory.rb
spree_core-3.4.1 lib/spree/testing_support/factories/calculator_factory.rb
spree_core-3.4.0 lib/spree/testing_support/factories/calculator_factory.rb
spree_core-3.4.0.rc2 lib/spree/testing_support/factories/calculator_factory.rb
spree_core-3.1.10 lib/spree/testing_support/factories/calculator_factory.rb
spree_core-3.4.0.rc1 lib/spree/testing_support/factories/calculator_factory.rb
spree_core-3.3.2 lib/spree/testing_support/factories/calculator_factory.rb
spree_core-3.2.5 lib/spree/testing_support/factories/calculator_factory.rb
spree_core-3.1.9 lib/spree/testing_support/factories/calculator_factory.rb
spree_core-3.3.1 lib/spree/testing_support/factories/calculator_factory.rb
spree_core-3.2.4 lib/spree/testing_support/factories/calculator_factory.rb
spree_core-3.1.8 lib/spree/testing_support/factories/calculator_factory.rb
spree_core-3.3.0 lib/spree/testing_support/factories/calculator_factory.rb