Sha256: aee3cd395f805ac9c7cef342fdd8b79e4354ea77b04643230d6d99516aaf78ce

Contents?: true

Size: 571 Bytes

Versions: 33

Compression:

Stored size: 571 Bytes

Contents

FactoryBot.define do
  factory :option_value, class: Spree::OptionValue do
    sequence(:name) { |n| "Size-#{n}" }
    presentation    { 'S' }
    option_type
  end

  factory :option_value_variant, class: Spree::OptionValueVariant do
    option_value
    variant
  end

  factory :option_type, class: Spree::OptionType do
    sequence(:name) { |n| "foo-size-#{n}" }
    presentation    { 'Size' }

    trait :size do
      name { 'size' }
      presentation { 'Size' }
    end

    trait :color do
      name { 'color' }
      presentation { 'Color' }
    end
  end
end

Version data entries

33 entries across 33 versions & 1 rubygems

Version Path
spree_core-4.10.1 lib/spree/testing_support/factories/options_factory.rb
spree_core-4.10.0 lib/spree/testing_support/factories/options_factory.rb
spree_core-4.9.0 lib/spree/testing_support/factories/options_factory.rb
spree_core-4.8.3 lib/spree/testing_support/factories/options_factory.rb
spree_core-4.8.2 lib/spree/testing_support/factories/options_factory.rb
spree_core-4.7.3 lib/spree/testing_support/factories/options_factory.rb
spree_core-4.6.6 lib/spree/testing_support/factories/options_factory.rb
spree_core-4.5.5 lib/spree/testing_support/factories/options_factory.rb
spree_core-4.3.3 lib/spree/testing_support/factories/options_factory.rb
spree_core-4.4.1 lib/spree/testing_support/factories/options_factory.rb
spree_core-4.5.4 lib/spree/testing_support/factories/options_factory.rb
spree_core-4.6.5 lib/spree/testing_support/factories/options_factory.rb
spree_core-4.7.2 lib/spree/testing_support/factories/options_factory.rb
spree_core-4.7.1 lib/spree/testing_support/factories/options_factory.rb
spree_core-4.6.4 lib/spree/testing_support/factories/options_factory.rb
spree_core-4.7.0 lib/spree/testing_support/factories/options_factory.rb
spree_core-4.6.3 lib/spree/testing_support/factories/options_factory.rb
spree_core-4.6.2 lib/spree/testing_support/factories/options_factory.rb
spree_core-4.6.1 lib/spree/testing_support/factories/options_factory.rb
spree_core-4.6.0 lib/spree/testing_support/factories/options_factory.rb