[rspec-users] Database clearing

Mark Wilden mark at mwilden.com
Fri Sep 19 10:42:06 EDT 2008

On Fri, Sep 19, 2008 at 6:22 AM, Todd Tyree <todd at snappl.co.uk> wrote:

> I have  user model with a number of specs: some of them use fixtures and
> some of them don't.  Today, while talking someone through some specs that
> needed developming, I noticed that the fixtures always seemed to be
> loading.  When I investigated, I discovered that it was not the fixtures
> always loading, but the db not clearing between runs.

I don't know the exact mechanism, but if we want a table to be emply that
might have had fixtures loaded into it at some point, we delete_all in
before(). It seems to me that if you have fixtures, they would be loaded
before every test, but you say that you're not seeing that.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20080919/77f45918/attachment.html>

More information about the rspec-users mailing list