robfletcher
03/28/2016, 5:42 PMhhariri
hhariri
hhariri
robfletcher
03/28/2016, 6:18 PMgivenData
and found it a bit limiting – the “given” expression is entirely dependent on the toString
value of the iterable elementsrobfletcher
03/28/2016, 6:19 PM(1..100).forEach { i -> given(“an integer $i”) …
robfletcher
03/28/2016, 6:19 PMrobfletcher
03/28/2016, 6:22 PMon
or it
just as easily as given
robfletcher
03/28/2016, 6:22 PMrobfletcher
03/28/2016, 6:22 PMrobfletcher
03/28/2016, 6:24 PMrobfletcher
03/28/2016, 6:26 PMx…
is effectively like an @Ignore
annotation in JUnit or Spock?robfletcher
03/28/2016, 6:26 PMrobfletcher
03/28/2016, 6:29 PM|
and ||
operators in a certain context and then relying on custom tooling support to make it easy to keep the tables tidy.robfletcher
03/28/2016, 6:36 PMforEach
that I find appealing – it’s a lot like how I write JavaScript tests using Jasminerobfletcher
03/28/2016, 11:41 PMgiven
, on
, it
– and it appears that’s no longer the case. Feels very like Jasmine which I’ve always liked structurally (probably RSpec too but I’m not really familiar with it)robfletcher
03/28/2016, 11:42 PMit
has a clean context – that drives me mad in Scalatestrobfletcher
03/28/2016, 11:42 PMrobfletcher
03/28/2016, 11:44 PMlkogler
03/29/2016, 12:14 AMlkogler
03/29/2016, 12:15 AMrobfletcher
03/29/2016, 12:19 AMrobfletcher
03/29/2016, 12:20 AMrobfletcher
03/29/2016, 12:21 AMDiagrammedAssertions
trait or Groovy’s assert
keyword just isn’t theresalomonbrys
03/30/2016, 11:24 AM1.0.0
, works very well.
My two cents: I like the semantics of "`given` / on
/ `it`" or just "`given` / `it`". Will Spek allow to choose between given
/ on
or is it just in spek 1.0.0 to facilitate the transition to describe
?
I would really like given
and on
to stay 😉 But if they do, I think they should be an alias with the addition of the keyword at the beginning of the describe string. (e.g. : given(description, block)
should be an alias to describe("Given " + description, block)
).
Right now, when I use given("a calculator")
, the test runner displays "a calculator" while I wish it displayed "Given a calculator".robfletcher
03/30/2016, 11:42 AMgiven
, on
, it
.hhariri
hhariri
salomonbrys
03/30/2016, 2:21 PMhoang
03/31/2016, 10:01 AM