-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow using Examples after Outline #122
Allow using Examples after Outline #122
Conversation
@deanWombourne any thoughts on that? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, just that one question about the commented out exit code for the linter
@@ -464,7 +464,7 @@ | |||
); | |||
runOnlyForDeploymentPostprocessing = 0; | |||
shellPath = /bin/sh; | |||
shellScript = "pushd \"${SRCROOT}/..\"\n ./scripts/lint\n exit $?\npopd"; | |||
shellScript = "pushd \"${SRCROOT}/..\"\n ./scripts/lint\n#exit $?\npopd"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this intentional?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no, I forgot to remove it 🤦♂️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, really thought I'd approved this ages ago!
I noticed that there was an attempt in #14 to implement this to follow more closely standard Gherkin syntax, but it does not work well with escaping closures, so here is an alternative solution with trailing closure or parameters to pass examples after outline. Xcode indentation is a bit funky in these cases, so I'm not very confident in this approach.
Original solution for that could be possible if Gherkin syntax methods are moved out of XCTestCase and become global functions, but that will require storing a reference to currently executing test case in global variable which may lead to more complicated implementation, and will allow using these functions out of XCTestCase implementation, so is also not ideal 🤷♂️
Example: