Empty Givens? #44
-
Hi, I have a few things that need to be tested when my app starts and I am not entirely sure how to do this. Am I right to assume that a scenario needs to have at least one each of Cheers, Alex |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I think your best bet here is to keep Gherkin as useful as possible Given some context that does not need to execute
When I run the app
Then some testable outcome is achieved And then have Swift code that matches your Given and simply contains no instructions: Given("^some context that does not need to execute$") { _, _ in } Personally, I would add all these steps to a different swift file of some kind so that they don't muddy up code. Examples of how I've gone about that can seen in #23 HOWEVER, a scenario does not need to have the keyword |
Beta Was this translation helpful? Give feedback.
I think your best bet here is to keep Gherkin as useful as possible
And then have Swift code that matches your Given and simply contains no instructions:
Personally, I would add all these steps to a different swift file of some kind so that they don't muddy up code. Examples of how I've gone about that can seen in #23
HOWEVER, a scenario does not need to have the keyword
Given
in it. You could start a scenario withWhen
orThen
because Gherkin has line-based parsing. It has some hierarchy, but not a whole lot. So if yo…