[rspec-devel] Rspec blowing away my initial data
weexpectedthis
weexpectedthis at gmail.com
Fri Jun 6 16:45:24 EDT 2008
Fixtures are evil, at least in my opinion. And this isn't data I want loaded
in each test, it's data that is basically storing constants in my database.
I need this to be in the migration, but I don't want to have to enter the
data in the migration and in a fixture as well.
-Kyle
Maurício Linhares-3 wrote:
>
> This isn't an rspec feature, every time you run your rails app tests
> it will drop the whole database and rebuild it again (based on the
> development database) but only the structure will be copied, no data
> will be copied and no migrations are run.
>
> If you want to add test data to your specs you should use fixtures
> instead or just add your data in a "before" block and remove it in an
> "after" block.
>
--
View this message in context: http://www.nabble.com/Rspec-blowing-away-my-initial-data-tp17697155p17700821.html
Sent from the rspec-devel mailing list archive at Nabble.com.
More information about the rspec-devel
mailing list