pivotal/jasmine — pull request #189 by maxbrunsfeld (2012-02-26 00:56:45+00:00)
Title: add support for chainable matchers

I've added support for creating chainable matchers like this:

```javascript
this.addMatchers({
"toBeBetween": function(lowerBound) {
return this.actual >= lowerBound;
},

"toBeBetween and": function(upperBound) {
return this.actual <= upperBound;
}
});

expect(3).toBeBetween(1).and(5);
expect(8).not.toBeBetween(1).and(5);
```

you can also do it like this:

```javascript
this.addMatchers("toBeBetween", {
"and": function(upperBound) {
return this.actual <= upperBound;
}
});
```