rluba/hamjest — pull request #8 by alexbepple (2014-12-11 19:57:50+00:00)
Title: Diff for `hasProperties`

When using `hasProperties` we are more interested in the given properties than in anything else. So the diff becomes more useful if only the differing aspects are shown. `describeMismatch` uses a similar reasoning.

In order to do this, I had to change the diff API. Cp. https://github.com/rluba/hamjest/pull/7#issuecomment-66612504
I refactored the early beginnings that we had so far.

When creating the diff objects in `hasProperties`, I considered the following situations:
* direct properties (implicit equalTo)
* diff-capable matcher
* non-diff-capable matcher
* multiple nesting, e.g. `__.hasProperties({a: __.hasProperties({b: __.greaterThan(2)})})`

## Real-life example

### Before
![screen shot 2014-12-11 at 13 52 42](https://cloud.githubusercontent.com/assets/159355/5400984/fd97ae64-8177-11e4-9084-41f8c8afbb08.png)

### After
(with a custom property matcher for nicer formatting)

![screen shot 2014-12-11 at 20 12 28](https://cloud.githubusercontent.com/assets/159355/5400990/02f91352-8178-11e4-9a2b-90e2a8c83d7c.png)