Using 1.6.8-SNAPSHOT I see a problem using shared contexts (I'm pretty
sure this used to work, but if somehow I'm not doing it correct,
please advise :-)
I have this:
object ExcelParserSpec extends Specification with Mockito with
MockMatchers with MockRequest {
var inputFile: String = _
var importer:ExcelParser = _
val excel2003 = beforeContext({println("Before 3");inputFile =
"/import/dna.xls"; importer=new ExcelParser(inputFile,
getClass.getResourceAsStream(inputFile))})
val excel2007 = beforeContext({println("Before 7");inputFile =
"/import/dna-2007.xlsm"; importer=new ExcelParser(inputFile,
getClass.getResourceAsStream(inputFile))})
"An Excel 2003 file" ->-(excel2003) should {
"be readable" in {
importer must notBeNull
println("In test")
}
}
"An Excel 2007 file" ->-(excel2007) should {
behave like "An Excel 2003 file"
}
}
But it seems like the 2007 context is never really used. This is the
output I get:
Before 3
In test
Before 7
Before 3
In test
Any hints?
/Jeppe
No
> - you use shareVariables()?
No
> - you use a different way of running the tests (in junit, in sbt, in
> the console)?
No
> - you use specs2 ;-) ?
Maybe, haven't tried this yet :-)
/Jeppe
> --
> You received this message because you are subscribed to the Google Groups "specs-users" group.
> To post to this group, send email to specs...@googlegroups.com.
> To unsubscribe from this group, send email to specs-users...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/specs-users?hl=en.
>
>