Sha256: ff91f24da97912600d18c00228836832bc46985e99360ab1a1a5c80428cd399d

Contents?: true

Size: 475 Bytes

Versions: 92

Compression:

Stored size: 475 Bytes

Contents

FactoryGirl.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|
        zone_member = Spree::ZoneMember.create(zoneable: c, zone: zone)
      end
    end
  end

  factory :zone, class: Spree::Zone do
    name { generate(:random_string) }
    description { generate(:random_string) }
  end
end

Version data entries

92 entries across 92 versions & 2 rubygems

Version Path
solidus_core-1.1.4 lib/spree/testing_support/factories/zone_factory.rb
solidus_core-1.0.7 lib/spree/testing_support/factories/zone_factory.rb
solidus_core-1.0.6 lib/spree/testing_support/factories/zone_factory.rb
solidus_core-1.1.3 lib/spree/testing_support/factories/zone_factory.rb
solidus_core-1.0.5 lib/spree/testing_support/factories/zone_factory.rb
solidus_core-1.0.4 lib/spree/testing_support/factories/zone_factory.rb
solidus_core-1.1.2 lib/spree/testing_support/factories/zone_factory.rb
solidus_core-1.0.3 lib/spree/testing_support/factories/zone_factory.rb
solidus_core-1.1.1 lib/spree/testing_support/factories/zone_factory.rb
solidus_core-1.1.0 lib/spree/testing_support/factories/zone_factory.rb
solidus_core-1.1.0.pre2 lib/spree/testing_support/factories/zone_factory.rb
solidus_core-1.1.0.pre1 lib/spree/testing_support/factories/zone_factory.rb
solidus_core-1.1.0.beta1 lib/spree/testing_support/factories/zone_factory.rb
solidus_core-1.0.2 lib/spree/testing_support/factories/zone_factory.rb
spree_core-2.4.10 lib/spree/testing_support/factories/zone_factory.rb
spree_core-2.3.13 lib/spree/testing_support/factories/zone_factory.rb
solidus_core-1.0.1 lib/spree/testing_support/factories/zone_factory.rb
spree_core-2.2.14 lib/spree/testing_support/factories/zone_factory.rb
solidus_core-1.0.0 lib/spree/testing_support/factories/zone_factory.rb
solidus_core-1.0.0.rc2 lib/spree/testing_support/factories/zone_factory.rb