Ruby on Rails的新手,如果有人可以帮我指出正确的方向,我将不胜感激。谢谢
Finished tests in 0.627036s, 38.2753 tests/s, 74.9558 assertions/s.
1) Error:
CartsControllerTest#test_should_destroy_cart:
ActionView::MissingTemplate: Missing template carts/destroy, application/destroy
with {:locale=>[:en], :formats=>[:html], :handlers=>[:erb, :builder, :raw, :ruby, :jbuilder, :coffee]}. Searched in:
* "c:/Users/Daniel Huang/My Documents/projects/trying-again/depot/app/views"
app/controllers/carts_controller.rb:85:in `set_cart'
test/controllers/carts_controller_test.rb:45:in `block (2 levels) in <class:
CartsControllerTest>'
test/controllers/carts_controller_test.rb:43:in `block in <class:CartsControllerTest>'
2) Error:
CartsControllerTest#test_should_update_cart:
ActionView::MissingTemplate: Missing template carts/update, application/update w
ith {:locale=>[:en], :formats=>[:html], :handlers=>[:erb, :builder, :raw, :ruby,
:jbuilder, :coffee]}. Searched in:
* "c:/Users/Daniel Huang/My Documents/projects/trying-again/depot/app/views"
app/controllers/carts_controller.rb:85:in `set_cart'
test/controllers/carts_controller_test.rb:38:in `block in <class:CartsControllerTest>'
3) Error:
LineItemsControllerTest#test_should_create_line_item:
AbstractController::ActionNotFound: The action 'create' could not be found for L
ineItemsController
test/controllers/line_items_controller_test.rb:21:in `block (2 levels) in <class:LineItemsControllerTest>'
test/controllers/line_items_controller_test.rb:20:in `block in <class:LineIt
emsControllerTest>'
4) Error:
LineItemsControllerTest#test_should_destroy_line_item:
AbstractController::ActionNotFound: The action 'destroy' could not be found for
LineItemsController
test/controllers/line_items_controller_test.rb:44:in `block (2 levels) in class:LineItemsControllerTest>'
test/controllers/line_items_controller_test.rb:43:in `block in <class:LineItemsControllerTest>'
5) Error:
LineItemsControllerTest#test_should_get_new:
ActionView::Template::Error: First argument in form cannot contain nil or be empty
app/views/line_items/_form.html.erb:1:in_app_views_line_items__form_html_erb___607916578_29103084'
app/views/line_items/new.html.erb:3:in `_app_views_line_items_new_html_erb__
_811078298_42530004'
test/controllers/line_items_controller_test.rb:15:in `block in <class:LineIt
emsControllerTest>'
6) Error:
LineItemsControllerTest#test_should_update_line_item:
ActionController::ParameterMissing: param not found: line_item
app/controllers/line_items_controller.rb:89:in `line_item_params'
app/controllers/line_items_controller.rb:59:in `block in update'
app/controllers/line_items_controller.rb:58:in `update'
test/controllers/line_items_controller_test.rb:38:in `block in<class:LineItemsControllerTest>'
24 tests, 47 assertions, 0 failures, 6 errors, 0 skips
c:\Users\Daniel Huang\My Documents\projects\trying-again\depot>