Permalink
Browse files

Functions can have functions on them

  • Loading branch information...
1 parent e19ef10 commit f717034005a5a1cf4113e91ad29e22bef8e6e366 @felixge committed Jun 13, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/gently/gently.js
View
@@ -14,7 +14,7 @@ Gently.prototype.expect = function(obj, method, count, mock) {
( 'Bad 1st argument for gently.expect(), '
+ 'object or function expected, got: '+(typeof obj)
);
- } else if (typeof obj == 'function') {
+ } else if (typeof obj == 'function' && (typeof method != 'string')) {
// expect(mock) interface
mock = obj;
obj = null;

0 comments on commit f717034

Please sign in to comment.