pivotal/jasmine — pull request #264 by dburt (2012-08-08 04:33:11+00:00)
Title: Change toBeCloseTo matcher to be more consistent

It now calculates and compares a difference, rather than rounding
two separate quantities and testing for their equality.

This fixes the problem where:
expect(1.225).toBeCloseTo(1.234); // difference is 0.009, and it passes
expect(1.225).toBeCloseTo(1.224); // difference is 0.001, but it fails

All the existing specs still pass; I've just added two examples like the above, with the first negated.