Rick Denatale wrote: > On Mon, Jul 21, 2008 at 8:34 PM, Mark Wilden <[EMAIL PROTECTED]> > wrote: > >> don't know if that explains the behavior you're seeing. >> >> >>> I would like to use autotest but I can't trust the results. >>> >> >> autotest also does not copy the database structure. I've been using it for >> six months and I've never noticed a problem with it. Why don't you trust it? >> >> I doubt that it's a problem with not copy the database structure from dev > to test. That sync's the db schema and would only be needed after a > schema > change (i.e. one or more migrations have been run), and it would be much > more likely to cause a failure in Textmate when the code under test > doesn't > see the expected db schema. > > It's more likely that there are undeclared fixtures affecting the spec, > a > spec which needs particular state in the database might succeed or not > depending on whether or not previous specs either left data behind, or > deleted data needed by the spec in question. > > When I've seen cases where test/specs behaved differently when run > separately vs. being run in batch (e.g. by Rake) it's almost always > because > I left out a fixture declaration. > > -- > Rick DeNatale > > My blog on Ruby > http://talklikeaduck.denhaven2.com/
Hi, thanks for the answer today I ran rake several times and all my test passed (and that made me very happy) but suddenly the tests for this model started failing again. Prior to each test I delete all records for the model and I have no fixture for that particular model. I am just starting with sdd and I find fixtures to give me more trouble than they solve so when I need to populate the database I create and save the models I need thus I have all the dependencies. What do you mean by undeclared fixture? a fixture with no data? What is strange is that some validation specs ('it should require name') that don't depend on database also fail. -- Posted via http://www.ruby-forum.com/. _______________________________________________ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users