Skip to content
Wes Alvaro edited this page Jan 27, 2015 · 2 revisions
  • be
  • be close to
  • be falsy
  • be greater than
  • be instance of
  • be less than
  • be none
  • be truthy
  • contain
  • equal
  • match
  • raise
  • have been called with
  • have been called

These matchers are called like so:

expect(actual).toBeCloseTo(3)
expect(actual).to_be_close_to(3)

The words are mushed together and bump cased or separated by _.

The word to gets stuck at the beginning.

All matchers can be negated by adding a not at the beginning of the matcher call:

expect(actual).notToBeCloseTo(3)
expect(actual).not_to_be_close_to(3)
Clone this wiki locally