cjohansen/Sinon.JS — pull request #338 by tf (2013-10-18 05:48:36+00:00)
Title: onCall method for building sequential stub behavior

The full discussion of this change can be found in #244.

Major changes:
* Calling `yields*` or `callArg*` methods on stubs multiple times no longer defines sequential behavior but redefines the behavior.
* New `onCall(n)`, `onFirstCall`, `onSecondCall`, `onThirdCall` methods to define sequential behavior. All stub behavior defining methods (including `returns*`, `throws*`, `withArgs`) can be used. Arbitrary combinations of `withArgs` and `onCall` work.

Code organization changes:
* Extract `behavior` class from parallel arrays in `stubs`.