iammerrick/Squire.js — pull request #23 by jump (2013-02-24 19:38:31+00:00)
Title: Fix for object literal mocks

When passed an object as the path, the mock() method was iterating over the keys and adding them but also adding the object itself afterwards. The mocks object ends up looking something like:

```
{
"mocks/Shirt": Object,
"[object Object]": undefined
}
```

Incidentally, a couple of tests that were using arrays instead of strings for the path actually passed due to the above bug. After the array items had been iterated over, the array itself was used as a key in the mocks object and the string coercion produced the intended module name:

```
{
"0": "mocks/Shirt"
"mocks/Shirt": Object
}
```