Comparing version 0.1.2 to 0.1.3
@@ -18,2 +18,7 @@ | ||
* added auto-naming to patching | ||
* Added support for callbacks | ||
* Added support for callbacks | ||
0.1.3 / 2012-09-28 | ||
================== | ||
* Added ability to set returnValue |
@@ -101,2 +101,5 @@ var assert = require('assert'); | ||
if(name === 'returnValue'){ | ||
if(returnValue === undefined){ | ||
returnValue = new SuperMock({ mockName:metrics.name + '()' }); | ||
} | ||
return returnValue; | ||
@@ -118,3 +121,7 @@ } | ||
set: function(receiver, name, value) { | ||
self[name] = value; | ||
if(name === 'returnValue'){ | ||
returnValue = value; | ||
} else { | ||
self[name] = value; | ||
} | ||
return true; | ||
@@ -121,0 +128,0 @@ }, |
{ | ||
"name": "supermock", | ||
"version": "0.1.2", | ||
"version": "0.1.3", | ||
"description": "Versatile Dynamic Mocking for NodeJS", | ||
@@ -5,0 +5,0 @@ "keywords": ["mock", "testing", "mocking"], |
Sorry, the diff of this file is not supported yet
73970
258