Matchers check whether some expected value or block behaves as described in the spec. They are essentially assertions in other test frameworks. There are many different types of matchers.
Matchers are generally created and passed to an "expectation partial."
They follow (are passed to) the
#to_not method of
should_not method when the "should" syntax is used.
expect(foo).to eq(bar) # ^^^^^^^ This is the matcher.
Similar to the
MatchData when they are used.
The match data includes information such as:
whether the match was successful, expected and actual values, and messages for output.
Matchers can be grouped into the following categories. For a list of available matchers and what they do, check the links below.