cjohansen/Sinon.JS — Issue #90: Simpler Args
Author: quangv
Created: 2012-03-05 09:10:04+00:00
State: open

So correct me if I'm wrong, but the only way to access `args` is...

```javascript
spy('dog');

// to get 'dog'
spy.args[0][0]
spy.getCall(0).args[0]
spy.lastCall.args[0] // firstCall etc.
```

Seems kind of verbose to me...

Sometimes when one of my args is something that I can't use `.calledWith`, like a _callback function_ I'd like to manually check if that particular arg is a _'function'_ (is testing `args` directly instead of using a sinon method, bad practice?)

Most of the time my tests are simple and only call the `spy` once... so I do a lot of `firstcall`, `lastcall`...

what's your thoughts on something simpler, like...

```javascript
spy.arg(0) // == spy.lastCall.args[0]
spy.arg(-1) // == spy.lastCall.args[spy.lastCall.length-1]
```