cedric
06/17/2016, 2:18 AMval
version, doesn't it?raniejade
06/17/2016, 2:19 AMcedric
06/17/2016, 2:20 AMval
to emulate that behavior, I would simply do:
with(Calculator()) {
...
}
No need for any functionality in Spek and users are free to share or not share the instance of their Calculator
.cedric
06/17/2016, 2:20 AMraniejade
06/17/2016, 2:23 AMraniejade
06/17/2016, 2:24 AMcedric
06/17/2016, 2:24 AMit
specs with it. Or do that inside a it
. Bottom line is: leverage the language as much as possible while adding as few features as possible.cedric
06/17/2016, 2:25 AMassert4j
, hamcrest
or whatever. Again, more flexibility for users, less work for you and you can focus on the actual core functionality of Spekraniejade
06/17/2016, 2:26 AMraniejade
06/17/2016, 2:26 AMcedric
06/17/2016, 2:28 AMsubject
feature raises a bunch of red flags.raniejade
06/17/2016, 2:30 AMraniejade
06/17/2016, 2:32 AMcedric
06/17/2016, 2:34 AMsubject
locks users in a certain mode and duplicates a feature Kotlin already gives you (a simple property) and it's not flexible. For example, what if you want two of your it
specs to share a subject but all the others to use a different instance?raniejade
06/17/2016, 2:43 AMcedric
06/17/2016, 2:43 AMcedric
06/17/2016, 2:43 AMcedric
06/17/2016, 2:44 AMraniejade
06/17/2016, 2:44 AMraniejade
06/17/2016, 2:45 AMcedric
06/17/2016, 2:45 AMraniejade
06/17/2016, 2:50 AMraniejade
06/17/2016, 2:50 AMcedric
06/17/2016, 2:50 AMraniejade
06/17/2016, 2:52 AMsubjects
. It allows you to share specscedric
06/17/2016, 2:58 AMhhariri
adambl4
06/21/2016, 11:03 AMartem_zin
06/21/2016, 12:11 PMkirillrakhman
06/23/2016, 9:16 AM