When working on the final tests for Chapter 11 around page 156 of the PDF, I was still getting an error on my test, as follows:
1) Failure: LineItemsControllerTest#test_should_create_line_item_via_ajax [.../work/depot/test/controllers/line_items_controller_test.rb:36]: No JQuery call matches [:html, "#cart"]
I was having a difficult time finding the fix for this, as it is not readily apparent from the error message.
However, I finally came across this github bug:
It states that the problem, directly related to this exercise in fact, is that spaces cannot be in the initial .html() declaration.
In our case, depot/app/views/line_items/create.js.erb cannot have any space outside of the quotes in the following line:
which had to be changed to:
or else it will throw the aforementioned error. Removing the whitespace fixed the problem.