After changing the code in the line_items_controller create method (to use the new add_product method on the cart) I tried running the tests, and one failed:
1) Error: test_should_create_line_item(LineItemsControllerTest): NoMethodError: You have a nil object when you didn't expect it! You might have expected an instance of Array. The error occurred while evaluating nil.- /Users/bishboria/Documents/Programming/Ruby/depot/app/models/cart.rb:9:in `add_product' /Users/bishboria/Documents/Programming/Ruby/depot/app/controllers/line_items_controller.rb:47:in `create'
Any ideas how this can be fixed?