On Tuesday, July 22, 2014 8:23:07 AM UTC+2, Roelof Wobben wrote:
>
> Hello,
>
> I do still follow the Hartl tutorial.
> Am at chapter 6 and according to the manual the test schould be
> successfull but I see these error messages:
>
>
> Failures:
>
>
>
>
>
>
>
>
>
> 1) User when password doesn't match confirmation return value of
> authenticate method with valid password
>
>
> Failure/Error:
> it { should eq found_user.authenticate(@user.password) }
>
>
>
> NoMethodError
> :
>
>
> undefined method `authenticate' for nil:NilClass
>
>
>
>
> # ./spec/models/user_spec.rb:91:in `block (5 levels) in <top (required)>'
>
>
> You can find my code here :
> https://github.com/roelof1967/sample_app_nutrious/tree/chapter_six
>
> Roelof
>
@Aaron: as of his gemfile he uses 4.1.4. I don't think save! could solve
that because the previous example pass (line 20):
it { should be_valid }
The problem is that he is callilng authenticate on Nil.
--
You received this message because you are subscribed to the Google Groups
"rspec" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/rspec/09a1007d-9811-4548-80f9-e5b0f3f33a17%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.