Failure/Error: @user = User.create!(@attr)
I am following railstutorial.org on Chapter 7开发者_JAVA技巧 and when running tests I get the error
User password encryption has_password? method should be true if the passwords match
Failure/Error: @user = User.create!(@attr)
undefined method password' for #<User:0xa242d18>
# ./spec/models/user_spec.rb:105:in
block (3 levels) in '
line 105 of user_spec.rb:105 is @u @user = User.create!(@attr)ser = User.create!(@attr)
Is your database updated? The users table should have a column 'password,' did you forget to run a migration?
精彩评论