[rspec-users] Database clearing
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...
More information about the rspec-users