Use isFunction to check for functionness in callFake

- Fixes #1191
This commit is contained in:
Gregg Van Hove
2016-09-14 16:06:44 -07:00
parent 8624a52ee0
commit 4e47b78f1f
5 changed files with 19 additions and 11 deletions

View File

@@ -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;