[rspec-users] before_save model callback rspec testing
hayafirst at gmail.com
Mon Jun 23 11:07:15 EDT 2008
You don't have attr_accessor :password, :password_confirmation in
User, do you? You may want to add this and try again
On Mon, Jun 23, 2008 at 9:59 AM, Csongor Bartus <lists at ruby-forum.com> wrote:
> Yi Wen wrote:
>> fire up script/console and copy line 82 and try it out. and report the
>> result here.
>>> u = User.create!(:login => "test", :email => "test at test.com", :password => "test123", :password_confirmation => "test123")
> NoMethodError: You have a nil object when you didn't expect it!
> You might have expected an instance of Array.
> The error occurred while evaluating nil.each
> from (irb):1
> Posted via http://www.ruby-forum.com/.
> rspec-users mailing list
> rspec-users at rubyforge.org
More information about the rspec-users