views:

151

answers:

1

I'm following this tutorial I'm focusing on the testing portion.

I'm trying to test the following snippet:

def test_disallowed_passwords
   u = User.new    
   ...{some more testing code}
   assert !u.save                   <<<<<<This is line 27

The

u. save

should fail in this case.

When I run the test, I get the following:

ruby test/unit/user_test.rb

Loaded suite test/unit/user_test
Started
.E
1) Error:
test_disallowed_passwords(UserTest):
TypeError: nil is not a symbol
test/unit/user_test.rb:27:in `test_disallowed_passwords'

I'm using ruby 1.8.6

A: 

There was a type in my model code.

cbrulak