From 1d51d224c7a329a23690eeddb7a421acf9a9b8da Mon Sep 17 00:00:00 2001 From: Christian Williams Date: Thu, 5 Aug 2010 00:54:43 -0700 Subject: [PATCH] Deprecate toNotBe, toNotEqual, toNotMatch, and toNotContain matchers. --- user-guide.html.markdown | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/user-guide.html.markdown b/user-guide.html.markdown index d8e182f..48b696e 100644 --- a/user-guide.html.markdown +++ b/user-guide.html.markdown @@ -101,6 +101,8 @@ Jasmine has several built-in matchers. Here are a few: > >`expect(fn).toThrow(e);` passes if function `fn` throws exception `e` when executed +The old matchers `toNotEqual`, `toNotBe`, `toNotMatch`, and `toNotContain` have been deprecated and will be removed in a future release. Please change your specs to use `not.toEqual`, `not.toBe`, `not.toMatch`, and `not.toContain` respectively. + Every matcher's criteria can be inverted by prepending `.not`: >`expect(x).not.toEqual(y);` compares objects or primitives `x` and `y` and passes if they are *not* equivalent @@ -350,7 +352,7 @@ There are spy-specfic matchers that are very handy. `expect(x).not.toHaveBeenCalledWith(arguments)` passes if `x` is a spy and was not called with the specified arguments -The old matchers `wasCalled`, `wasNotCalled`, `wasCalledWith`, and `wasNotCalledWith` have been deprecated and will be removed in a future release. Please change your specs to use `toHaveBeenCalled`, `not.toHaveBeenCalled`, `toHaveBeenCalledWith`, and `not.toHaveBeenCalledWith` respectively. +The old matchers `wasCalled`, `wasNotCalled`, `wasCalledWith`, and `wasNotCalledWith` have been deprecated and will be removed in a future release. Please change your specs to use `toHaveBeenCalled`, `not.toHaveBeenCalled`, `toHaveBeenCalledWith`, and `not.toHaveBeenCalledWith` respectively. Spies can be trained to respond in a variety of ways when invoked: