Rename hashContaining to objectContaining, since this is javascript. Also call the toString from prettyPrinter

This commit is contained in:
gvanhove
2011-03-10 07:59:19 -08:00
parent 992367dcbc
commit 7158fc2426
7 changed files with 32 additions and 23 deletions

View File

@@ -83,5 +83,12 @@ describe("jasmine.pp", function () {
expect(jasmine.pp(jasmine.createSpy("something"))).toEqual("spy on something");
});
it("calls toString for ObjectContaining objects", function () {
var containing = new jasmine.Matchers.ObjectContaining({});
spyOn(containing, "toString").andReturn("stringified!");
expect(jasmine.pp(containing)).toEqual("stringified!");
expect(containing.toString).toHaveBeenCalled();
});
});