Why
has_many :line_items, :dependent => destroy
in the cart.rb model file causing failed tests
I have been working through the "Agile Web Development with Rails" book and am about half way through the depot application (I did skip around a bit).
When I go to run the default test ("the truth") I get failed tests. Trace says
"/Users/username/Documents/rails_projects/depot/app/models/cart.rb:2:in `destroy': wrong number of arguments (0 for 1) (ArgumentError) from /Users/username/Documents/rails_projects/depot/app/models/cart.rb:2"
If I comment that line out I no longer get the error message and the tests pass. But I don't understand the error message.
What should I be looking at? Is this a valid failure that I need to fix somehow?
Thanks