[rspec-users] Is #valid? automatically called?

Pat Maddox pat.maddox at gmail.com
Fri Feb 13 00:07:57 EST 2009

On Thu, Feb 12, 2009 at 8:31 PM, Tero Tilus <tero at tilus.net> wrote:
> 2009-02-12 15:42, Pat Maddox:
>>> The fact that you are asking this shows that we're violating the
>>> principle of least surprise.
>> Yes it's a surprise
> How do you know #errors_on not implicitly validating wouldn't be
> bigger surprise?  Say 30 (instead of three now surprised) people would
> be surprised.

Well, I don't know.  If you've used Rails for a while you know that AR
objects don't have errors attached to them until valid? is called.

Anyway, I think overall the implicit valid? is a good thing.


More information about the rspec-users mailing list