Doug
2009-Dec-28 23:56 UTC
[rspec-users] rake spec seems to not clean the database after failing specs
running all specs with ''rake spec'' working on a spec that gets run last. when run individually, it is green. but in ''rake spec'' it fails because the database is dirty I''m guessing this is caused by early specs that fail as well ???? is this normal? if that''s the problem, what''s the best way to force the database to be cleaned after each scenario? I have database_cleaner (with cucumber), but just the default configuration thanks
Rick DeNatale
2009-Dec-29 00:22 UTC
[rspec-users] rake spec seems to not clean the database after failing specs
On Mon, Dec 28, 2009 at 6:56 PM, Doug <dgoldie15 at gmail.com> wrote:> running all specs with ''rake spec'' > > working on a spec that gets run last. > when run individually, it is green. > but in ''rake spec'' it fails because the database is dirty > > I''m guessing this is caused by early specs that fail as well > ???? > is this normal? > > if that''s the problem, what''s the best way to force the database to be > cleaned after each scenario?Be careful what you wish for. I normally want to set the database to a known state BEFORE running specs rather than cleaning up afterwards. Why? Because it''s easier to debug failures if you preserve the evidence. -- Rick DeNatale Blog: http://talklikeaduck.denhaven2.com/ Twitter: http://twitter.com/RickDeNatale WWR: http://www.workingwithrails.com/person/9021-rick-denatale LinkedIn: http://www.linkedin.com/in/rickdenatale