Fixture question

Ok, I’m pretty sure I’ve seen this done before. I have a fixture that
isn’t named the same as the table I want to insert the stuff into.
Whats the right way to go about this?!

Google has failed me! :frowning:

-Nick

Nick S. wrote:

Ok, I’m pretty sure I’ve seen this done before. I have a fixture that
isn’t named the same as the table I want to insert the stuff into.
Whats the right way to go about this?!

Unless you’re doing wizardly fixture sharing the simplest thing would be
to rename the yml file. Otherwise you need to embed ruby snippets into
the
fixtures, same as you do for rhtml files in your views

zsombor

Could of sworn I saw this somewhere, maybe I’m wrong. The reason I ask
is for testing STI, and having the different classes be allowed to use
different fixtures…meh, guess I’ll stick em all in one file then.

Thanks anyways!
-Nick

That looks like what I ran across last time! Thanks Tony!

-Nick

Have a look at:
http://wiki.rubyonrails.com/rails/pages/FlexibleFixtures
Sounds like what you are after.
Knew I’d seen it somewhere as well :slight_smile:
Cheers,
Tony