On Tue, Nov 4, 2008 at 2:45 PM, Greg Hauptmann <
[EMAIL PROTECTED]> wrote:

>
> I have an issue in that I have some reference data my migrations run
> in. However when running  "rake spec" it seems to remove the data in
> the test database up front.
>
> What do you recommend to workaround this issue?
>

Don't do that. :) At least, that's my opinion. Depending on database
contents for testing is a brittle road to hoe. As I just finished saying, I
like my test database to be clean and identical in schema to my development
database. 'rake spec' does that.

Without knowing your situation exactly, I would suggest either mocking out
calls that you expect to deliver the prepopulated data, creating that data
in your specs as needed, writing fixtures that load the data in, and/or
examining whether that data is really necessary for testing.

///ark
_______________________________________________
rspec-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to