Problem Referencing Fixture Objects

In my tests, I use fixtures, eg pupils.yml might be:

jimmy:
id: 100003
known_as: Jimmy
surname: Page
academic_year_id: 1
gender: m

In the test, @jimmy (the referencing style referred to in Agile Web
Dev…)
is nil, whereas pupil(:jimmy) returns the expected Pupil object.

What gives?

Robert

Robert J. wrote:

is nil, whereas pupil(:jimmy) returns the expected Pupil object.

What gives?

A change in syntax between the book’s publication and Rails 1.0. You
can turn the ols style back on, but unless you’ve got old, failing
tests, there’s really not much reason.

Alex Y. wrote:

In the test, @jimmy (the referencing style referred to in Agile Web
Dev…) is nil, whereas pupil(:jimmy) returns the expected Pupil object.

What gives?

A change in syntax between the book’s publication and Rails 1.0. You
can turn the ols style back on, but unless you’ve got old, failing
tests, there’s really not much reason.

Thanks - I thought I was going nuts!

Robert