Grails
  1. Grails
  2. GRAILS-8739

Testing docs for Grails 2.0 @TestFor do not enumerate all provided instances mixed into test

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0 final
    • Fix Version/s: 2.0.1
    • Component/s: Documentation
    • Labels:
      None

      Description

      As noted in the existing docs (section 9.1.1) @TestFor provides a new instance variable for testing:

      -
      Adding the TestFor annotation to a controller causes a new "controller" field to be automatically created for the controller under test.
      -

      In a similar way, a service class gets a "service" field, but that is not documented. Apparently, other @TestFor insertions likely apply and should enumerated.

        Activity

        Show
        Graeme Rocher added a comment - fixed by https://github.com/grails/grails-doc/commit/504ea0f886eaa0c8044ef670f8643100ee36485d
        Hide
        Joe Little added a comment -

        Saw the change for Controller, but didn't see a change or anything added for service, which doesn't mentioned the "service" instance variable, etc. or other such @TestFor instance variable creations. Does this apply to domains in some way, such as a "domain" instance variable?

        Show
        Joe Little added a comment - Saw the change for Controller, but didn't see a change or anything added for service, which doesn't mentioned the "service" instance variable, etc. or other such @TestFor instance variable creations. Does this apply to domains in some way, such as a "domain" instance variable?

          People

          • Assignee:
            Graeme Rocher
            Reporter:
            Joe Little
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development