contains(_:)
Creates an expectation that requires the value to be a string that contains a substring.
Declaration
static func contains(_ substring: String) -> SelfParameters
- substring:
The text to search for in the string.
Return Value
An expectation that searches a string value for substring.
Discussion
The comparison is exact and case-sensitive. A value that isn’t a string doesn’t satisfy the expectation.