velesin/jasmine-jquery — pull request #139 by lalunamel (2013-08-02 04:10:34+00:00)
Title: Add support for jQuery object equality

### I would like to see support for testing the equality of jquery objects.

Currently, asking jasmine if two jQuery objects are equal (through the function `jasmine.getEnv().equals_(object1, object2)`) will fail even if those jQuery objects are referencing the same DOM element.
This is annoying because it causes functions like `toHaveBeenCalledWith` to not work as expected when passing jQuery objects as arguments.

#### This pull request adds support for checking if two jQuery objects are equal. As a result, functions like `toHaveBeenCalledWith` will work as expected when passed jQuery objects.

To be clear, a jQuery object is typically something returned by `$('div')`
For two jQuery objects to be equal means that:
* If objects with only one element are compared, both objects reference the same DOM element, even if they have different selectors
* If objects with many elements are compared, both objects reference the same set of elements, no more, no less