Sha256: bd4932655ecc0f8afa93bb658fc40fa5eef1c5a203426914ae491fde17f82eca
Contents?: true
Size: 528 Bytes
Versions: 11
Compression:
Stored size: 528 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{|c| Spree::ZoneMember.create({:zoneable => c, :zone => zone})} 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
11 entries across 11 versions & 1 rubygems