Grails
  1. Grails
  2. GRAILS-7257

Test-app script cannot handle spaces in test names

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.3.6
    • Fix Version/s: 1.3.7, 1.4-M1, 2.0 final, 3.0
    • Component/s: None
    • Labels:
      None
    • Environment:
      Ubuntu 10.10
      test-app

      Description

      For example:

      void 'this test will not work'() {
      assertTrue true
      }

      will fail with an error similar to the one below. It should pass.

      Error executing script TestApp: Illegal method name "Given X and Y, Z equals W" in class uk/co/desirableobjects/whatever/XyzTests

        Activity

        Hide
        Luke Daley added a comment -

        What makes you think this should work?

        Show
        Luke Daley added a comment - What makes you think this should work?
        Hide
        Edo added a comment -

        I'm confused. Should it work?

        Show
        Edo added a comment - I'm confused. Should it work?
        Hide
        Antony Jones added a comment -

        It's a fairly common way to write test names in groovy, groovy allows spaces in method names.

        Try it in your ide, it works and is extremely readable.

        – Posted from Bugbox for Android

        Show
        Antony Jones added a comment - It's a fairly common way to write test names in groovy, groovy allows spaces in method names. Try it in your ide, it works and is extremely readable. – Posted from Bugbox for Android
        Hide
        Edo added a comment -

        Interesting. Thank you.

        Show
        Edo added a comment - Interesting. Thank you.
        Hide
        Luke Daley added a comment -

        Just because your IDE handles it doesn't mean that it should work.

        Please provide the full stack trace so I can at least see which part of the testing stack is rejecting it.

        Show
        Luke Daley added a comment - Just because your IDE handles it doesn't mean that it should work. Please provide the full stack trace so I can at least see which part of the testing stack is rejecting it.
        Hide
        Antony Jones added a comment -

        Now working - probably due to a switch to Groovy 1.7.8 in Grails 1.3.7+

        Show
        Antony Jones added a comment - Now working - probably due to a switch to Groovy 1.7.8 in Grails 1.3.7+
        Hide
        Graeme Rocher added a comment -

        Bulk closing bunch of resolved issues

        Show
        Graeme Rocher added a comment - Bulk closing bunch of resolved issues

          People

          • Assignee:
            Unassigned
            Reporter:
            Antony Jones
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development