searls/jasmine-stealth — Issue #1: add "andOn" to the when...thenReturn chain
Author: searls
Created: 2011-10-31 20:17:45+00:00
State: open

andOn would test the call's `object` property to only allow stubbing if the object jasmine-equals to what was expected.

For example. if I want to stub this:

``` javascript
$(window).scrollTop();
```

I should be able to do this:

``` javascript
spyOn($.fn, "scrollTop").when().andOn($(window)).thenReturn(48);
```