You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

11 lines
520 B

Factory.define(:ppx_order) do |record|
# associations:
record.association(:user, :factory => :user)
record.association(:bill_address, :factory => :address)
record.association(:shipping_method, :factory => :shipping_method)
record.ship_address { |ship_address| Factory(:ppx_address, :city => "Chevy Chase", :zipcode => "20815") }
end
Factory.define :ppx_order_with_totals, :parent => :order do |f|
f.after_create { |order| Factory(:line_item, :order => order, :price => 10) and order.line_items.reload }
end