Skip to content

Commit

Permalink
Update readme with correct Custom Validation code sample
Browse files Browse the repository at this point in the history
Closes Quick#963
  • Loading branch information
nekno authored Feb 18, 2022
1 parent 0bf627c commit ef89f66
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1266,19 +1266,19 @@ Note: This matcher allows you to chain any number of matchers together. This pro
// passes if .succeeded is returned from the closure
expect {
guard case .enumCaseWithAssociatedValueThatIDontCareAbout = actual else {
return .failed(reason: "wrong enum case")
return { .failed(reason: "wrong enum case") }
}
return .succeeded
return { .succeeded }
}.to(succeed())
// passes if .failed is returned from the closure
expect {
guard case .enumCaseWithAssociatedValueThatIDontCareAbout = actual else {
return .failed(reason: "wrong enum case")
return { .failed(reason: "wrong enum case") }
}
return .succeeded
return { .succeeded }
}.notTo(succeed())
```

Expand Down

0 comments on commit ef89f66

Please sign in to comment.