documentcloud/backbone — pull request #1373 by wookiehangover (2012-06-03 00:18:47+00:00)
Title: adding the `expected` argument to all tests

As discussed with @braddunbar, this adds an `expected` argument to all tests. For one, this improves consistency in the test suite and establishes a guideline for declaring expectations in all future tests. Although this is only explicitly needed in a handful of individual tests, this can help to prevent future breakages or regressions in the number of assertions being run.

There was 1 test that's currently unable to receive an `expected` argument set. When testing for nested model changes, this test alternates between 2 and 4 assertions. See: https://github.com/wookiehangover/backbone/blob/test_expected/test/model.js#L498

I'd have like to fix this along with this patch, but wanted to get the pull req out there in order to have a few more eyes on it.

Thanks!