feat(spy): add option to respy

will not throw error if spyOn called on a spy

fixes #931
This commit is contained in:
guy-mograbi-at-gigaspaces
2015-10-24 08:37:33 +03:00
parent 48f42eaa7d
commit e7dbc75fc2
3 changed files with 43 additions and 3 deletions

View File

@@ -270,6 +270,10 @@ getJasmineRequireObj().Env = function(j$) {
return runnableResources[currentRunnable().id].spies;
}});
this.allowRespy = function( allow ){
spyRegistry.setAllowRespy( allow );
};
this.spyOn = function() {
return spyRegistry.spyOn.apply(spyRegistry, arguments);
};