Topic: Single YML file for multiple tables

We're reaching some of the more complicated parts of our project and I have a test case that requires 12-13 tables to have data in them to make this work.

Is there some way to make one YML file or otherwise isolate this testing data from the rest of my  teams testing data?

Our existing fixtures are testing small areas of the system or short paths within it. If I needed a user and group and some permissions then I'd just create a few new entries in the right tables. The current test case is much more massive, it requires 12-13 tables to be filled in with the correct data. Those testing cases are based off of a more realistic use case and the data would provide a good foundation for our demonstrations and early user testing.

I'd like to keep the 'realistic' testing data seperate from the 'short-path' testing data as much as possible so we don't have to go through all of it when we get a demo ready late next month.

Thanks for your help and suggestions.

Re: Single YML file for multiple tables

Found part of a workaround.

I created ../test/fixtures/demo and added a line to test_helper.rb to update the Test::UnitTest path.

The tests work correctly with that. The problem now is that I'm trying to rake the fixtures in /demo into my dev database and rake:fixtures:load always loads from /fixtures.

How do I specify a different path for rake:fixtures:load??

Re: Single YML file for multiple tables

Check out the tutorial I posted the other day on working with large fixture sets. - Brewery and Brewpub management powered by RoR

Re: Single YML file for multiple tables

Ooh neat! Thanks for the help!

Re: Single YML file for multiple tables

Finally got through some support tickets and back to the main project. Your snippets helped a lot, thank you for writing them and posting them.