Instead of using "user.valid?", how can I make it more specific so I'm
just testing the password attribute?
On Sep 2, 1:30 am, Philip Hallstrom <phi...@pjkh.com> wrote:
> This test is meant to test one thing -- that a password must be at least 8 characters. Testing "user.valid?" tests much more than that. That could be false for any number of reasons -- perhaps you have a validation that rejects "example.com" as a valid email address.
>
> I would test that at least one error exists on the :password attribute for the user
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
No comments:
Post a Comment