User Tag List
Results 1 to 5 of 5
Threaded View
- Join Date
- Jul 2008
- Location
- Yorkshire, UK
- 38
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
assert_not_nil assigns(:story) error p186 Simple Rails 2, Help!
Working through Simple Rails 2, on page 186 "Testing the Controller"
for the code:
Code Ruby:
def test_should_show_index get :index assert_response :success assert_template 'index' assert_not_nil assigns(:story) end
The last lineCode Ruby:
assert_not_nil assigns(:story)
"...... <nil> expected to not be nil"
when i run "rake test:functionals"
The code works perfectly when i call it from a web browser.
I don't really understand what's going on. Any ideas, suggestions?
Thanks
Afuera
Last edited by afuera; Jul 10, 2008 at 11:53. Reason: added ruby highlighting
Bookmarks