Sha256: 1faba8878e6d4fa351b63c73e669f390b476be35bc95951ef98af5ee3cd987bc
Contents?: true
Size: 559 Bytes
Versions: 10
Compression:
Stored size: 559 Bytes
Contents
FactoryGirl.define do factory :global_zone, :class => Spree::Zone do name 'GlobalZone' description { Faker::Lorem.sentence } zone_members do |proxy| zone = proxy.instance_eval{@instance} Spree::Country.find(:all).map do |c| zone_member = Spree::ZoneMember.create(:zoneable => c, :zone => zone) end end end factory :zone, :class => Spree::Zone do name { Faker::Lorem.words } description { Faker::Lorem.sentence } zone_members { [Spree::ZoneMember.create(:zoneable => Factory(:country))] } end end
Version data entries
10 entries across 10 versions & 1 rubygems