Permalink
Browse files

Add quick mention of '.not' matcher inversion.

  • Loading branch information...
1 parent 7721f47 commit 581d948c93d6bebabcbae87253cd1c1ca1ef5409 @xian xian committed Mar 4, 2010
Showing with 4 additions and 0 deletions.
  1. +4 −0 README.markdown
View
@@ -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.

0 comments on commit 581d948

Please sign in to comment.