This project is archived and is in readonly mode.
Using Fixtures docs in API RDoc needs work
Reported by smerp | January 30th, 2009 @ 04:13 AM | in 2.x
The current "Using Fixtures" documentation notes three methods of accessing fixture data from within Rails tests:
- By using a hash stored in an instance variable named after the
fixture e.g.
@blobs['foo']['name']
- By using an instance variable named after the record name, e.g.
@foo.name
- By using a dynamically-created object, e.g.
blobs(:foo).name
However, the default has been to not instantiate instance
variables, which means only method #3 will work.
Furthermore, all examples don't use the test
method
for each test case.
Recommend moving method #3 to be the primary method, and note how to
enable methods #1 and #2. Update examples to show this, using the new
test
methods.
Complete writeup here: http://smerpology.org/sprocket/a...
Comments and changes to this ticket
-
smerp January 30th, 2009 @ 05:41 AM
- Tag changed from 2.2.2, doc, documentation to 2.2.2, doc, documentation, patch
Submitting a patch to the documentation for review.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>