Uploaded image for project: 'Buildr (Retired)'
  1. Buildr (Retired)
  2. BUILDR-286

Specs Runner Fails on Indistinct Companion Object

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 1.3.4
    • 1.3.5
    • Test frameworks
    • None
    • JRuby 1.3.1, Mac OS X, SoyLatte 1.6.0_03-p3

    Description

      The Specs auto-detection seems to do something unfortunate whenever the specification object is accompanied by a companion class. The most common case for this is when a Specs runner class accompanies the specification (for tools like Eclipse's JUnit View). For example:

      import org.specs._
      import runner.JUnit4

      object MySpecs extends Specification {
      ...
      }

      class MySpecs extends JUnit4(MySpec)

      When running `buildr` with this source in the src/spec/scala/ directory, the following error is produced:

      Running java MySpecs
      Exception in thread "main" java.lang.NoSuchMethodError: main
      The following tests failed:
      MySpecs
      Buildr aborted!
      Tests failed!

      Attachments

        Activity

          People

            djspiewak Daniel Spiewak
            djspiewak Daniel Spiewak
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: