Sha256: eae68a1f4685839f2505a77cf99e00aae5ca421e5324ce90ff401f942e05eb97
Contents?: true
Size: 666 Bytes
Versions: 48
Compression:
Stored size: 666 Bytes
Contents
# frozen_string_literal: true require 'spree/testing_support/factories/product_factory' require 'spree/testing_support/factories/property_factory' require 'spree/testing_support/factories/option_value_factory' FactoryBot.define do factory :variant_property_rule, class: 'Spree::VariantPropertyRule' do product transient do property { create(:property) } option_value { create(:option_value) } property_value { nil } end after(:build) do |rule, evaluator| rule.conditions.build(option_value: evaluator.option_value) rule.values.build(property: evaluator.property, value: evaluator.property_value) end end end
Version data entries
48 entries across 48 versions & 2 rubygems