[Rails] Simple fixtures suggestion
Scott Barron
scott at elitists.net
Fri Dec 10 16:06:41 GMT 2004
On Sat, Dec 11, 2004 at 03:01:28AM +1100, Gavin Sinclair wrote:
> I haven't used fixtures yet, but since Rails 0.9 is coming out soon, I
> thought I'd speak up.
>
> A 'users' fixture might be found here, right?
>
> test/fixtures/users/users.yaml
>
> And the filename doesn't matter, so long as it ends in .yaml, right?
>
> Suggestion: also accept fixture data here:
>
> test/fixtures/users.yaml
This works already in the beta gems. The generator scripts will create
skeletal test/fixtures/<model>.yml for your fixturating pleasure.
I believe that all methods in 0.8.5 and before will also still work, and
there's now the option of using CSV.
-Scott
More information about the Rails
mailing list