# Matchers

As always there are many sitations where we need specific matchers to test situations. And for this RSpec has a lot of built in matchers that we can user depending on those sitations.

## Equivalence matchers

Equivalence matchers are used to comparing values and variables. These are the most commenly used in RSpec. In ruby there are different ways to compare values. And the result varies on how strict you want to be when comparing values. For example 1 and 1.0 are very close but not exactly the same. We have to keep this in mind when using equivalence matchers.

![](https://939397000-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L9htzNbAvfpKcVkZT-D%2F-L9hu-eH5xWIUnJXzT0n%2F-L9hu0uCK8Dn9U2ecM-f%2Fcarbon%20\(31\).png?generation=1523336095197868\&alt=media)

Truthiness matchers

Numeric comparison matchers

Collections

Predicate matchers

Observation matchers
