maiflai / gradle-scalatest

A plugin to enable the use of scalatest in a gradle Scala project.
The Unlicense
73 stars 35 forks source link

Spec is only run if the class ends in "Spec" #79

Closed will-sargent-eero closed 4 years ago

will-sargent-eero commented 4 years ago

If you have a class that is called "Spec22" then the plugin will not find it.

will-sargent-eero commented 4 years ago

https://github.com/maiflai/gradle-scalatest/blob/cae43c9ec3e1933cd99cf4dc1ffe4df2f1112a0c/src/main/groovy/com/github/maiflai/ScalaTestAction.groovy#L149

maiflai commented 4 years ago

Sorry for the delay.

I'm not sure that what you have above is strictly and completely true? I didn't find it easy to shim Gradle's test filtering logic into ScalaTest. It may be that you need to use a substring of the test name in order to run a single spec.

Do you have a complete example that I could take a closer look at please?

Thanks, Stu.

will-sargent-eero commented 4 years ago

@maiflai added example project https://github.com/will-sargent-eero/demo-scalatest-project

maiflai commented 4 years ago

Thanks - have added a test and fix on master. I'll see if I can get a release out soon.

maiflai commented 4 years ago

deployed 0.26 with a fix, please could you see if it addresses your issue?

thanks, Stu

will-sargent-eero commented 4 years ago

Fixed by https://github.com/maiflai/gradle-scalatest/commit/22a25c88a1b03d289b102acef9fd5cf97f233fdc