[rspec-users] rspec causing validates_presence_of to validate twice?

David Chelimsky dchelimsky at gmail.com
Wed Oct 17 22:31:19 EDT 2007

On 10/17/07, Steve <vertebrate at gmail.com> wrote:
> Also I really don't think I'm leaking state. I have before(:each) statements in my "describes" that
> basically create new instances of the object as required for that
> behavior. So they are fresh each time, correct? Further, even though rails
> clears the errors collection when valid? is called, I called
> @user.errors.clear before attempting the validations that are failing with
> the double message just to be sure, and it's still happening. Again, these
> problems don't happen in script/console at all, but it is validating
> correctly.

This all may be true but I can't help you diagnose the problem without
looking at the code. If you'd kindly pastie the spec and model, I'll
be glad to look at them. Otherwise I'm just guessing and that's not
working out to well so far.

More information about the rspec-users mailing list