Given I have 2 cucumbers in my belly
When I eat another cucumber
Then I will have 3 cucumbers in my belly
As opposed to:
Given I have 2 cucumbers in my belly
When I eat another Cucumber
Then I should have 3 cucumber in my belly
I don't really know what I think about this. I'm so used to using 'should' in cukes I do it without really thinking about it. Has anybody tried this? Any experiences or opinions to share?
cheers,
Matt
--
Freelance programmer & coach
Author, http://pragprog.com/book/hwcuc/the-cucumber-book (with Aslak Hellesøy)
Founder, http://relishapp.com
+44(0)7974430184 | http://twitter.com/mattwynne
> We've had some feedback for the The Cucumber Book that we should encourage people to use the word "will" in their Then steps instead of "should". For example:
>
> Given I have 2 cucumbers in my belly
> When I eat another cucumber
> Then I will have 3 cucumbers in my belly
>
> As opposed to:
>
> Given I have 2 cucumbers in my belly
> When I eat another Cucumber
> Then I should have 3 cucumber in my belly
>
> I don't really know what I think about this. I'm so used to using 'should' in cukes I do it without really thinking about it. Has anybody tried this? Any experiences or opinions to share?
>
> cheers,
> Matt
How about:
Given I have 2 cucumbers in my belly
When I eat another Cucumber
Then I have 3 cucumber in my belly
Feels more like a document of how it works, and removes the must/will/should debate.
WDYT?
Yeah, that's nice in theory, but problem comes when you want to implement the step definition! There's no way to tell whether you're looking at a context setup or an outcome assertion step.
Doh!
'Will' makes more sense from a business prospective and when a TPM or Businesss Analyst reads this in a feature file ; they find it more accurate in terms of business logic being applied .
--
You received this message because you are subscribed to the Google Groups "Cukes" group.
To post to this group, send email to cu...@googlegroups.com.
To unsubscribe from this group, send email to cukes+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/cukes?hl=en.
+1
>
> Yeah, that's nice in theory, but problem comes when you want to implement the step definition! There's no way to tell whether you're looking at a context setup or an outcome assertion step.
>
> Doh!
>
I've been using this style for a while and haven't run into many
problems in practice. Whatever the case, I think the important part to
note is that the team's choice of language here is part of their
ubiquitous language in the DDD sense, so consistency and mutual
agreement trump any One Way.
Mike
> cheers,
> Matt
>
> --
> Freelance programmer & coach
> Author, http://pragprog.com/book/hwcuc/the-cucumber-book (with Aslak Hellesøy)
> Founder, http://relishapp.com
> +44(0)7974430184 | http://twitter.com/mattwynne
>
Mike
> cheers,
> Matt
>
> --
> Freelance programmer & coach
> Author, http://pragprog.com/book/hwcuc/the-cucumber-book (with Aslak Hellesøy)
> Founder, http://relishapp.com
> +44(0)7974430184 | http://twitter.com/mattwynne
>
> --
> You received this message because you are subscribed to the Google Groups "Cukes" group.
> To post to this group, send email to cu...@googlegroups.com.
> To unsubscribe from this group, send email to cukes+un...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/cukes?hl=en.
>
>
--
You received this message because you are subscribed to the Google Groups "Cukes" group.
To post to this group, send email to cu...@googlegroups.com.
To unsubscribe from this group, send email to cukes+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/cukes?hl=en.
The use of "shall" is recommended in RFC2119 and there's a discussion of Shall and Will on Wikipedia.