Has_and_belongs_to_many -- how to create test fixtures?


#1

Hallo – can anyone offer me any pointers as to I should handle
many-to-many relationships in Rails tests?
Cheers,
doug.


#2

Just name the fixture file after the join table, eg people_notes.yml if
you are using has_and_belongs_to_many between the people and notes
table.

-Jonny

doug wrote:

Hallo – can anyone offer me any pointers as to I should handle
many-to-many relationships in Rails tests?
Cheers,
doug.


#3

Jonathan V. wrote:

Just name the fixture file after the join table, eg people_notes.yml if
you are using has_and_belongs_to_many between the people and notes
table.

-Jonny

doug wrote:

Hallo – can anyone offer me any pointers as to I should handle
many-to-many relationships in Rails tests?
Cheers,
doug.

Thanks very much, man!