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
Add pending tests #38
Conversation
pending function ignores the block passed.
@@ -31,6 +31,10 @@ | |||
let example = Example(description, closure) | |||
World.currentExampleGroup()!.appendExample(example) | |||
} | |||
|
|||
class func pending(description: String, closure: () -> ()) { | |||
NSLog("Pending: %@", description) |
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.
You should import Foundation
at the top of this file to prevent warnings when using NSLog
.
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, I will fix it.
What this Pull Request DoesOK, I think this is a good start. Since all example groups are compiled at the very beginning, before any tests are actually run, these pending blocks print before the rest of the test output:
What Specta DoesSpecta produces something like this, at the very end of the test output:
Furthermore, Specta pending examples are displayed in the test navigator. That's because they're registered as examples, just ones with Also, while Kiwi displays warnings in Xcode, Specta does not. In any case, it's probably impossible to display a warning in Swift at this point anyway (Swift doesn't support What Quick Should DoSo my new set of goals for pending is:
This pull request is probably the best we can do on the 4 goals above until I implement custom output formatters as part of #9. @bastos Thanks for the pull request! I had a few comments, but I'll merge as soon as you address those. Ping me @modocache once you're done or if you have any questions! |
@modocache Done. Yes, I agree with you, we need a better way to report pending tests, this implementation is very simple. Must be improved later. About the |
Merged! Thanks, @bastos! 🌟 |
Remove Nimble.playground
pending function ignores the block passed (Issue #16).