Muki-SkyWalker / specs

Automatically exported from code.google.com/p/specs
Other
0 stars 0 forks source link

Exceptions thrown during initialization not reported in the error count at the end. #184

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
If I declare a variable outside the SUS to use for my tests, to avoid code 
duplication, and an exception is thrown by the code to set that variable, then 
the final report at the end still shows success even though several tests were 
not run due to the exception being thrown.

For example:

{{{
import org.specs._

object StatsTests extends SpecificationWithJUnit {
  "Formula '3+7*2'" should {
    val f = Formula(expr="3+7*2") // <-- throws an error, but overall report shows success
    "evaluate to 17" in { f.calculateValue() must_== 17 }
  }
}
}}}

What is the expected output? What do you see instead?

I expect it to report a failure but I get:

{{{
Total for specification "StatsTests":
Finished in 0 second, 222 ms
9 examples, 9 expectations, 0 failure, 0 error
}}}

Original issue reported on code.google.com by dob...@gmail.com on 28 Jul 2011 at 4:47

GoogleCodeExporter commented 9 years ago
Can you please check if this issue is fixed now on 1.6.9-SNAPSHOT?

Thanks.

Original comment by etorrebo...@gmail.com on 28 Jul 2011 at 10:16

GoogleCodeExporter commented 9 years ago
Is that available in a maven repo somewhere?

Original comment by dob...@gmail.com on 31 Jul 2011 at 12:48

GoogleCodeExporter commented 9 years ago
You can get it here: 
http://scala-tools.org/repo-snapshots/org/scala-tools/testing/specs_2.9.0-1/1.6.
9-SNAPSHOT/

Original comment by etorrebo...@gmail.com on 31 Jul 2011 at 11:30