Results 1 to 5 of 5
Jul 10, 2008, 10:50 #1
- Join Date
- Jul 2008
- Yorkshire, UK
- 0 Post(s)
- 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:
def test_should_show_index get :index assert_response :success assert_template 'index' assert_not_nil assigns(:story) end
The last lineCode Ruby:
"...... <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?
Last edited by afuera; Jul 10, 2008 at 10:53. Reason: added ruby highlighting