Sha256: cddac0d12057d1cd876dd9b53ccac11c980fae0e50b1b1aeb86920802f3bb292
Contents?: true
Size: 711 Bytes
Versions: 56
Compression:
Stored size: 711 Bytes
Contents
FactoryBot.define do factory :global_zone, class: Spree::Zone do name { 'GlobalZone' } description { generate(:random_string) } zone_members do |proxy| zone = proxy.instance_eval { @instance } Spree::Country.all.map do |c| Spree::ZoneMember.create(zoneable: c, zone: zone) end end end factory :zone, class: Spree::Zone do name { generate(:random_string) } description { generate(:random_string) } factory :zone_with_country do zone_members do |proxy| zone = proxy.instance_eval { @instance } country = create(:country) [Spree::ZoneMember.create(zoneable: country, zone: zone)] end end end end
Version data entries
56 entries across 56 versions & 1 rubygems