From d85d6dd4b8a71aede68732d6fc8222bfd5000c6b Mon Sep 17 00:00:00 2001 From: Gregg Van Hove Date: Wed, 28 Sep 2016 12:19:18 -0700 Subject: [PATCH] Now that it's valid syntax, make the specs work right with `for` --- spec/core/SpySpec.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spec/core/SpySpec.js b/spec/core/SpySpec.js index 3a736893..15f8ae9f 100644 --- a/spec/core/SpySpec.js +++ b/spec/core/SpySpec.js @@ -70,7 +70,8 @@ describe('Spies', function () { ]; for (var arity = 0; arity < functions.length; arity++) { - var spy = jasmineUnderTest.createSpy(functions[arity].name, someFunction); + var someFunction = functions[arity], + spy = jasmineUnderTest.createSpy(someFunction.name, someFunction); expect(spy.length).toEqual(arity); }