When you find that none of the stock expectation matchers provide a natural-feeling expectation, you can very easily write your own. All you need to do is write a Ruby class that implements the following two methods:
matches?(actual)
failure_message_for_should
You are currently reading a PREVIEW of this book.
Get instant access to over
$1 million worth of books and videos.