chrisleishman/jsmockito — pull request #18 by Offler (2013-02-28 21:36:29+00:00)
Title: Adding support for mocking objects created with ECMAScript 5 Object.defineProperties method.

...hen use it to create the mock object prototype.

The reason for doing this is because object prototypes created using the Object.defineProperty method are not writable
by default and jsMockito overwrites the object methods when creating a mock.

So to allow jsMockito to mock/overwrite methods we use Object.create to override all methods that are enumerable on
the passed in Obj to mock with descriptors that set writable to true.

To test this properly required upgrading Rhino to the newest release.

Added tests to verify that it works as expected and methods that are not writable (but are enumerable) are mocked
correctly.