Saturday, January 15, 2011

Rails - Iteration E3 -Fixture tests for prices

Need further study: http://api.rubyonrails.org/classes/Fixtures.html

When I tried to follow simple example e.g.

one_quantity_two:
product_id: one
cart_id: 2
quantity: 2

line_item.product was a nil object.

The format that did work

one_quantity_two:
product_id: <%= Fixtures.identify(:one) %>
cart_id: 2
quantity: 2

Most likely culprit --> rails/ruby version?

No comments:

Post a Comment