[rspec-users] Fixtures not loading when running full test suite
apremdas at gmail.com
Fri Jan 28 17:34:00 EST 2011
On 14 August 2009 12:04, Rob Aldred <rob.aldred at setfiremedia.com> wrote:
> Hi, I've been trying to work this out for a while, im convinced its some
> local db configuration specific to my machine.
> When running `rake spec` 14 of my test fail all of them in the user_spec
> generated by restful auth.
> The error for all the failing tests is:
> Couldn't find User with ID=1
> Iv put some debugger lines and at the start of some of the tests it would
> appear that the users fixture is not being loaded when running the full
> If I run the specific test with the spec
> binary `spec spec/modes/user_spec.rb` all the fixtures are loaded and pass as expected.
> Further more, the error is only apparent when using mysql for the test
> When I use sqlite for the test db the tests pass when running the whole
> suite and the specific test...
> Weird... I'd like to know if anyone else has experienced this and if anyone
> has any pointers
> as to why the fixtures are not loaded when using mysql as the test db.
> Many thanks
Could this be something to do with mysql not resetting its numbering between
tests, so it is actually loading a user, but not with ID=1. I'm pretty sure
I've seen that behaviour in the past.
> rspec-users mailing list
> rspec-users at rubyforge.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the rspec-users