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
spree_core-2.0.7 lib/spree/testing_support/factories/zone_factory.rb
spree_core-2.1.2 lib/spree/testing_support/factories/zone_factory.rb
spree_core-2.0.6 lib/spree/testing_support/factories/zone_factory.rb
spree_core-2.1.1 lib/spree/testing_support/factories/zone_factory.rb
spree_core-2.0.5 lib/spree/testing_support/factories/zone_factory.rb
spree_core-2.1.0 lib/spree/testing_support/factories/zone_factory.rb
spree_core-2.0.4 lib/spree/testing_support/factories/zone_factory.rb
spree_core-2.0.3 lib/spree/testing_support/factories/zone_factory.rb
spree_core-2.0.2 lib/spree/testing_support/factories/zone_factory.rb
spree_core-2.0.1 lib/spree/testing_support/factories/zone_factory.rb
spree_core-2.0.0 lib/spree/testing_support/factories/zone_factory.rb
spree_core-2.0.0.rc1 lib/spree/testing_support/factories/zone_factory.rb