In looking at the new "Agile Web Development with Rails" pdf, we're finding the pdf confusing.
In the old book, fixture data was stored in a var, so you had something like
vc_book=@products["version_control_book"] assert_equal vc_book["id"], @product.id
You knew that the fixture data was loaded into @products, and the db data was contained in @product.id.
This is a fundamental testing methodology called "Golden Reference Model" where the fixture is the golden reference.
In the new scheme, fixtures are referred to as methods, which are seemingly objects. It seems to me the fixture file is lost, we are reading data from the db that has been loaded by the fixture. In the new pdf, comparisions are made to a fixed string. So I have to retype alll my data that is in the fixture? Am I missing something here?
I have a pretty simple request:
I would like a golden reference model. I want to use that reference model (Fixture) to compare output from the model, controllers, etc. Do I have to read the fixture file into the test method to compare? If so, how come there isn't a YAML import example in the book?
The new pdf's method of comparing vs. fixed strings is unacceptable.
We have three people, and everyone is generally confused. Maybe we're just dumb... but we've posted this several times in more complicated forms, and it doesn't seem to be addressed. Hopefully this post is simple enough where it can get us going in a direction.
Thanks!