On Mon, Mar 2, 2009 at 8:23 AM, Bart Zonneveld <[email protected]> wrote:
>
> On a second note, I noticed rspec default generated model specs now use
> Model.create!(@valid_attributes) as their default "all is valid" test.
> What's the advantage of this approach? I just write @model.attributes =
> @valid_attributes; @model.should be_valid, to prevent these specs to
> actually hit the db, and therefore speed up my specs a bit.

Wouldn't it be better to go through the complete create! cycle, to
make sure callbacks and database constraints (if any) are exercised?

///ark
_______________________________________________
rspec-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to