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 linegives me the error:Code 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?