[rspec-users] a better "should have valid associations"
chad at spicycode.com
Fri Mar 30 20:18:41 EDT 2007
I've been working on building out standard expectation matchers for
all the built-in validations in rails ala:
@user = User.new(valid_user_attributes)
@user.should require_presence_of :first_name
@user.should require_confirmation_of :password
The first version has a few of the validators, the next release coming
shortly will finish out all the rest.
On 3/30/07, Courtenay <court3nay at gmail.com> wrote:
> On 3/30/07, Brandon Keepers <bkeepers at gmail.com> wrote:
> > The only thing I don't like about this approach (and ones similar) is
> > that it only checks the declaration. While that is important, I also
> > think specs need to check that the declaration actually works
> > (foreign key exists in database, model exists, etc.).
> That's what my original post does.
> rspec-users mailing list
> rspec-users at rubyforge.org
More information about the rspec-users