[rspec-users] Unexplainable failure...at least for me
Tom Stuart
tom at experthuman.com
Wed Nov 7 09:54:36 EST 2007
On 7 Nov 2007, at 14:49, Chris Olsen wrote:
> So now the question is, why does the data not exist in the test
> database. The country and province data inserts exist within the
> migration files, ex for countries:
As someone who knows literally nothing about how this all works, I
still feel confident enough to guess that RSpec doesn't actually run
any migrations, but rather just clones the schema of the existing
development database -- so you get something that looks the same but
contains no data.
As the previous poster mentioned, you need to put the data into
fixtures and include them; see http://rspec.rubyforge.org/documentation/rails/writing/models.html
for examples.
Cheers,
-Tom
More information about the rspec-users
mailing list