Skip to content

can't run spec objects when the object is a companion of a trait #466

Description

@eyalfa

we use a pattern of writing our test suits as objects (best practice I guess) which works fine.
however sometimes we also define an empty trait with the same name just so we can get access to its slf4j logger using the class name (the companion has a trailing $):

trait JdbcDirectZTest {}

object JdbcDirectZTest
  extends ZIOSpecDefault
    with TestServices {

  val logger: Logger = Logger[JdbcDirectZTest]
  ...

The plugin does recognize the object as a test suit (adds the 'play' buttons on the object and tests), however when attempting to run the suite, we get this failure:

Run Configuration Error: Class 'com.datorama.pluto.sql.JdbcDirectZTest' is not inheritor of Suite trait

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions