@@ -1,4 +1,4 @@
|
||||
getJasmineRequireObj().SpyStrategy = function() {
|
||||
getJasmineRequireObj().SpyStrategy = function(j$) {
|
||||
|
||||
function SpyStrategy(options) {
|
||||
options = options || {};
|
||||
@@ -45,7 +45,7 @@ getJasmineRequireObj().SpyStrategy = function() {
|
||||
};
|
||||
|
||||
this.callFake = function(fn) {
|
||||
if(!(fn instanceof Function)) {
|
||||
if(!j$.isFunction_(fn)) {
|
||||
throw new Error('Argument passed to callFake should be a function, got ' + fn);
|
||||
}
|
||||
plan = fn;
|
||||
|
||||
@@ -29,6 +29,10 @@ getJasmineRequireObj().base = function(j$, jasmineGlobal) {
|
||||
return j$.isA_('Number', value);
|
||||
};
|
||||
|
||||
j$.isFunction_ = function(value) {
|
||||
return j$.isA_('Function', value);
|
||||
};
|
||||
|
||||
j$.isA_ = function(typeName, value) {
|
||||
return Object.prototype.toString.apply(value) === '[object ' + typeName + ']';
|
||||
};
|
||||
|
||||
@@ -45,7 +45,7 @@ var getJasmineRequireObj = (function (jasmineGlobal) {
|
||||
j$.ReportDispatcher = jRequire.ReportDispatcher();
|
||||
j$.Spec = jRequire.Spec(j$);
|
||||
j$.SpyRegistry = jRequire.SpyRegistry(j$);
|
||||
j$.SpyStrategy = jRequire.SpyStrategy();
|
||||
j$.SpyStrategy = jRequire.SpyStrategy(j$);
|
||||
j$.StringMatching = jRequire.StringMatching(j$);
|
||||
j$.Suite = jRequire.Suite(j$);
|
||||
j$.Timer = jRequire.Timer();
|
||||
|
||||
Reference in New Issue
Block a user