Sha256: 0d2c99ced0701b0b334c262b6f615372a8e3a2698a20f709a7d7fecbe7088346

Contents?: true

Size: 929 Bytes

Versions: 1

Compression:

Stored size: 929 Bytes

Contents

blueprint :apple do
  Fruit.create! :species => 'apple'
end

blueprint :many_apples => [:apple, :apple, :apple]

blueprint :bananas_and_apples => :apple do
  @banana = Fruit.create! :species => 'banana'
end

blueprint :orange do
  Fruit.create! :species => 'orange'
end

blueprint :fruit => [:apple, :orange] do
  [@orange, @apple]
end

blueprint :bananas_and_apples_and_oranges => [:bananas_and_apples, :orange] do
  @fruit = [@orange, @apple, @banana]
end

blueprint :cherry do
  Fruit.create! :species => 'cherry', :average_diameter => 3
end

blueprint :big_cherry => :cherry do
  Fruit.create! :species => @cherry.species, :average_diameter => 7
end

blueprint :cherry_basket => [:big_cherry, :cherry] do
  [@cherry, @big_cherry]
end

blueprint :parent_not_existing => :not_existing

Tree.blueprint :oak, :name => 'Oak', :size => 'large'

blueprint :pine do
  @the_pine = Tree.blueprint :name => 'Pine', :size => 'medium'
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
blueprints-0.2.0 spec/blueprints.rb