-
-
Notifications
You must be signed in to change notification settings - Fork 602
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 beEmpty
matcher for SetAlgebra
#594
Conversation
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.
This looks good to me, just one suggestion 👍
@@ -34,16 +34,12 @@ final class BeEmptyTest: XCTestCase, XCTestCaseProvider { | |||
|
|||
expect("").to(beEmpty()) | |||
expect("foo").toNot(beEmpty()) | |||
|
|||
expect([] as NSSortOptions).to(beEmpty()) |
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.
It feels slightly weird to rely on NSSortOptions
here, how do you feel about creating a TestOptionSet
type for testing purposes?
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.
Makes sense 👍
@@ -73,5 +69,35 @@ final class BeEmptyTest: XCTestCase, XCTestCaseProvider { | |||
failsWithErrorMessage("expected to be empty, got <foo>") { | |||
expect("foo").to(beEmpty()) | |||
} | |||
|
|||
failsWithErrorMessage("expected to not be empty, got <NSSortOptions(rawValue: 0)>") { |
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.
Having our own option set type here would also decouple us from NSSortOptions
's implementation of string conversion.
dce0a49
to
9e2e6b4
Compare
@sharplet Addressed your feedback! |
Add `beEmpty` matcher for `SetAlgebra`
Partially implements #496.