Sha256: 97d4c78c2bd828d69a8e3abfe528a1a5dd6e597b5ebd5990bd5990ae70f3dfc4
Contents?: true
Size: 680 Bytes
Versions: 3
Compression:
Stored size: 680 Bytes
Contents
# encoding: UTF-8 Watchmaker.learn :two_garages do 2.times do Factory.create(:garage) end end Watchmaker.learn :two_cars do 2.times do Factory.create(:car) end end Watchmaker.define :garage, :factories => [:garage] Watchmaker.define :car_with_garage, :factories => [:car], :watchmakers => [:garage] Watchmaker.define :car_in_garage, :factories => [:garage, :car] do |garage, car| garage.cars << car end Watchmaker.define :two_garages, :factories => [:garage, :garage] Watchmaker.define :two_cars_and_two_garages => [:two_garages, :car, :car] do |garages, car1, car2| garages.each do |garage| garage.cars << car1 garage.cars << car2 end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
watchmaker-0.2.2 | spec/support/watchmakers.rb |
watchmaker-0.2.1 | spec/support/watchmakers.rb |
watchmaker-0.2.0 | spec/support/watchmakers.rb |