Permalink
Browse files

cleanup

  • Loading branch information...
1 parent 8b85f53 commit 04e4d8045e395a80f902178282bf099e6625fad2 @nathanmacinnes committed Aug 5, 2012
Showing with 4 additions and 1 deletion.
  1. +4 −1 lib/pretendr.js
View
@@ -70,7 +70,7 @@ makePretendr = function (descriptor, mock) {
this.applyAttributesTo(copy);
return copy;
};
-
+
// the attributes object which contains the return value, et al, can be
// copied to the supplied other object with this function
baseObj.applyAttributesTo = function (other) {
@@ -97,6 +97,9 @@ makePretendr = function (descriptor, mock) {
baseObj.returnValue = setReturnValue;
baseObj.template = setTemplate;
}
+
+ // create the mocks, either based on the object passed in (for creating
+ // instances) or using the makeMock function
baseObj.mock = mock || makeMock(descriptor, baseObj, attributes);
if (nonPrimitive(descriptor)) {
for (i in descriptor) {

0 comments on commit 04e4d80

Please sign in to comment.