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.3.0.rc4 lib/spree/testing_support/factories/calculator_factory.rb
spree_core-3.3.0.rc3 lib/spree/testing_support/factories/calculator_factory.rb
spree_core-3.1.7 lib/spree/testing_support/factories/calculator_factory.rb
spree_core-3.2.3 lib/spree/testing_support/factories/calculator_factory.rb
spree_core-3.2.2 lib/spree/testing_support/factories/calculator_factory.rb
spree_core-3.3.0.rc2 lib/spree/testing_support/factories/calculator_factory.rb
spree_core-3.1.6 lib/spree/testing_support/factories/calculator_factory.rb
spree_core-3.3.0.rc1 lib/spree/testing_support/factories/calculator_factory.rb
spree_core-3.1.5 lib/spree/testing_support/factories/calculator_factory.rb
spree_core-3.2.1 lib/spree/testing_support/factories/calculator_factory.rb
spree_core-3.2.0 lib/spree/testing_support/factories/calculator_factory.rb
spree_core-3.1.4 lib/spree/testing_support/factories/calculator_factory.rb
spree_core-3.2.0.rc3 lib/spree/testing_support/factories/calculator_factory.rb
spree_core-3.2.0.rc2 lib/spree/testing_support/factories/calculator_factory.rb
spree_core-3.2.0.rc1 lib/spree/testing_support/factories/calculator_factory.rb
spree_core-3.1.3 lib/spree/testing_support/factories/calculator_factory.rb
spree_core-3.1.2 lib/spree/testing_support/factories/calculator_factory.rb
spree_core-3.0.10 lib/spree/testing_support/factories/calculator_factory.rb
spree_core-3.1.1 lib/spree/testing_support/factories/calculator_factory.rb
spree_core-3.1.0 lib/spree/testing_support/factories/calculator_factory.rb