Commit Graph

31 Commits

Author SHA1 Message Date
Christian Williams
b33b2d2cf1 toThrow()'s (and some other matchers') .not message is misleading. 2010-08-25 18:16:37 -07:00
Christian Williams
b3715075e3 Add custom messages for inverted spy matchers. 2010-08-13 00:32:32 -07:00
Christian Williams
9af81b627b Missing semicolons. 2010-08-05 23:10:09 -07:00
Christian Williams
5182e00c66 Wrapped matcher functions return undefined after expect() for futureproofing; we might want to allow matcher chaining, e.g.:
expect(x).toBeGreaterThan(3).and.toBeLessThan(6));
or other stuff e.g.:
  expect(x).toBeTrue().because("it just needs to be");
2010-08-04 13:52:38 -07:00
Christian Williams
676af93bea Refactor toThrow() matcher specs. 2010-08-03 18:51:31 -07:00
Christian Williams
4d7b839473 Fix not.toThrow() matcher exception when used with no args. 2010-08-02 18:36:26 -07:00
Lee Byrd & Christian Williams
2939aff80c deprecating wasCalled, wasCalledWith, wasNotCalled, wasNotCalledWith and adding toHaveBeenCalled, and toHaveBeenCalledWith 2010-06-24 10:34:03 -07:00
Lee Byrd & Christian Williams
413be6b4ca Remove deprecated class jasmine.Reporters.
Fully deprecate old-style Matchers; will be removed in next major version.
2010-06-22 17:35:41 -07:00
Lee Byrd & Christian Williams
01d842fdfd Removed references to 'window'; using jasmine.getGlobal() instead in order to better support non-browser environments.
Better protection around access to console.
The global object is now pretty-printed as "<global>", not "<window>".
Tests are a little closer to passing in node.js.
2010-06-22 16:22:09 -07:00
ragaskar
bf938ffc50 Correct number matching in equals_ 2010-03-18 20:32:40 -07:00
ragaskar
c85079e9d0 Handle string comparisons correctly with equals_ 2010-03-17 08:19:29 -07:00
Christian Williams
a661e77345 Remove jasmine.Matchers.pp(), use jasmine.pp() instead. 2010-03-05 22:34:37 -05:00
Christian Williams
49f295690a Old-style custom matchers (those which call this.report()) are not supported with the ".not" matcher negation syntax. 2010-03-01 23:02:59 -05:00
Christian Williams
4b80a10969 Fix specs. 2010-02-27 12:00:35 -05:00
Christian Williams
6574dcc728 Merge branch 'master' into dot-not 2010-02-27 11:57:15 -05:00
Josh Susser
5e3eb884ca Fix message bug with wasCalledWith. Throw on bad arguments to createSpyObj 2010-02-24 19:27:43 -08:00
Christian Williams
d16e2b7992 Add partial support for not -- e.g. expect(xxx).not.toEqual(yyy). Old-style custom matchers not yet supported. 2009-12-24 17:01:13 -05:00
Christian Williams
7653107f0c Use jasmine.undefined for all comparisons to the undefined value, since undefined itself may be redefined elsewhere
in app code.  Thanks to Charlie Meyer at UIUC for the suggestion.
2009-11-26 11:12:06 -05:00
Christian Williams
1a53838d97 Wrap base matchers from jasmine.Matcher prototype automatically at env instantiation time rather than manually. 2009-11-13 14:32:08 -05:00
Christian Williams
60ea562560 Reuse an 'it' block. 2009-11-13 13:21:40 -05:00
Christian Williams
b0326d3078 Reorganizing spy matcher specs. 2009-11-13 12:30:22 -05:00
Christian Williams
752b91f118 Reorganizing spy matcher specs. 2009-11-13 12:21:34 -05:00
Christian Williams
5a8a050c46 Removed toMatch and toNotMatch's message functions, now sufficiently handled by the default message builder. 2009-11-12 15:43:49 -05:00
Christian Williams
98e86817bf Fix wasCalledWith matcher. 2009-11-12 15:03:55 -05:00
Christian Williams
3b92b9bb79 Remove message function from matchers where a formulaic message is good enough. 2009-11-12 14:36:58 -05:00
Christian Williams
1b3545c82a Remove 'actual' param from matchers test and message functions. Use this.actual instead. This way, the signature of the test function matches how the matcher is called from a spec.
Spy matchers now throw an exception when called with non-spies, rather than returning false.  This makes the message function simpler, and will work better with future dot-not support.
Added better specs for error conditions on spy matchers.
2009-11-12 12:47:44 -05:00
ragaskar
827fd1da0e Pass sensible arguments in ExpectationResults 2009-10-29 20:33:47 -07:00
Ryan Dy & Rajan Agaskar
b67d2a265d major matcher refactor 2009-10-29 17:03:24 -07:00
ragaskar
73c0d57c94 Tuning to prevent stack overflows in FF 2009-10-05 22:36:10 -07:00
ragaskar
2588368231 Deprecate getResults() (use results()). Add some unit test coverage for jasmine.Spec. Add some unit test coverage for JsApiReporterSpec. 2009-09-28 11:13:44 -07:00
ragaskar
ba5b4ab166 Fix compatibility with the ruby contrib runner 2009-08-26 15:55:08 -07:00