From 581d948c93d6bebabcbae87253cd1c1ca1ef5409 Mon Sep 17 00:00:00 2001 From: Christian Williams Date: Wed, 3 Mar 2010 23:48:10 -0500 Subject: [PATCH] Add quick mention of '.not' matcher inversion. --- README.markdown | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.markdown b/README.markdown index bdc4943..f0a1ab1 100644 --- a/README.markdown +++ b/README.markdown @@ -116,6 +116,10 @@ Jasmine has several built-in matchers. Here are a few: > >`expect(x).toContain(y);` passes if array or string `x` contains `y` +Every matcher's criteria can be inverted by prepending `.not`: + +>`expect(x).not.toEqual(y);` compares objets or primitives `x` and `y` and passes if they are *not* equivalent + #### Writing New Matchers We've provided a small set of matchers that cover many common situations. However, we recommend that you write custom matchers when you want to assert a more specific sort of expectation. Custom matchers help to document the intent of your specs, and can help to remove code duplication in your specs.