You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have been following along in the book and am trying to run the $ rails test:controllers command but my test is failing. I think its because the view isn't getting the story object properly?
Here is the output from the error message:
Run options: --seed 61443
# Running:
E
Error:
StoriesControllerTest#test_should_get_index:
ActionView::Template::Error: undefined method `name' for nil:NilClass
app/views/stories/index.html.erb:2:in `_app_views_stories_index_html_erb___1312172176529221963_70288214234340'
test/controllers/stories_controller_test.rb:5:in `block in <class:StoriesControllerTest>'
bin/rails test test/controllers/stories_controller_test.rb:4
Finished in 0.338105s, 2.9577 runs/s, 0.0000 assertions/s.
1 runs, 0 assertions, 0 failures, 1 errors, 0 skips
The text was updated successfully, but these errors were encountered:
I have been following along in the book and am trying to run the
$ rails test:controllers
command but my test is failing. I think its because the view isn't getting the story object properly?Here is the output from the error message:
The text was updated successfully, but these errors were encountered: