Hi,
I'm trying to
define some
context so that it's executed for
each row of data table (
before assertion is run on each row).
I've found this
example but for the life of me I can't figure out how to write the full test suite.
I'd like to define context once and share it with all examples.
Here is roughly what I have:
class SomeSuite extends Specification with DataTables {
sequential
// TODO: define context somehow???
// val context = new Before { println("BEFORE") }
"test 1" should {
"do something" in {
context |
"col1" | "col2" |
val1 ! val2 |
val3 ! val4 |> {
(a, b) => //some assertion with (a, b)
}
}
}
}
I'd like to see "BEFORE" printed each time (total 2 times) before each assertion with (a, b).
I would really appreciate any help.
Thanks ;)