Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

Using Fixtures docs in API RDoc needs work

#1825

The current "Using Fixtures" documentation notes three methods of accessing fixture data from within Rails tests:

  1. By using a hash stored in an instance variable named after the fixture e.g. @blobs['foo']['name']
  2. By using an instance variable named after the record name, e.g. @foo.name
  3. 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...

Reported by smerp · January 30th, 2009 @ 04:13 AM

State: resolved
Milestone: 2.x
Assigned to: nobody
Importance: none

Activity

  1. smerp
    smerp
    • Tag changed from 2.2.2, doc, documentation to 2.2.2, doc, documentation, patch

    Submitting a patch to the documentation for review.

    January 30th, 2009 @ 05:41 AM

  2. Pratik
    Pratik
    • State changed from new to resolved

    Given docrails access.

    January 30th, 2009 @ 03:29 PM