Skip to content
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

[7.x] Refactor matchError matcher using Predicate.define #577

Merged
merged 1 commit into from Jul 18, 2018

Conversation

ikesyo
Copy link
Member

@ikesyo ikesyo commented Jul 18, 2018

Replacing Predicate.fromDeprecatedClosure.

Replacing `Predicate.fromDeprecatedClosure`.
@ikesyo ikesyo changed the title Refactor matchError matcher using Predicate.define [7.x] Refactor matchError matcher using Predicate.define Jul 18, 2018
@ikesyo ikesyo requested a review from a team July 18, 2018 13:02
let actualError = try actualExpression.evaluate()

let failureMessage = FailureMessage()
setFailureMessageForError(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it make sense for this function to become a mutating method on FailureMessage?

Copy link
Member Author

@ikesyo ikesyo Jul 18, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FailureMessage is not a struct but a class that extends NSObject so that does not make sense. Instead, I would like to replace the function with one which returns ExpectationMessage (in a separate PR).

@ikesyo
Copy link
Member Author

ikesyo commented Jul 18, 2018

Thanks @sharplet

@ikesyo ikesyo merged commit 765ab9c into 7.x-branch Jul 18, 2018
@ikesyo ikesyo deleted the refactor-matcherror-matcher branch July 18, 2018 15:49
Megal pushed a commit to Megal/Nimble that referenced this pull request Jul 31, 2019
[7.x] Refactor `matchError` matcher using `Predicate.define`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants