jasmine-contrib / grunt-jasmine-node

Grunt task for running jasmine-node
MIT License
67 stars 99 forks source link

createSpyObj and createSpy functions don't work #59

Closed abhinavgujjar closed 9 years ago

abhinavgujjar commented 9 years ago

I tried adding a single line to the existing sample spec at line 13

var spyObj = createSpyObj();

This throws error

Message: ReferenceError: createSpyObj is not defined

spyOn works; just spy creation functions don't work.

hereandnow commented 9 years ago

spyOn will be called directly, createSpyObj is a Child-Function of jasmine, and should be used that way:

var spyObj = jasmine.createSpyObj();
abhinavgujjar commented 9 years ago

yep - works. thank you! Maybe something to be included in the sample specs ? not sure if already present.

hereandnow commented 9 years ago

this is standard jasmine syntax, and should be (and is) documented there

abhinavgujjar commented 9 years ago

ah ok. My bad. It was working when I was using jasmine-node to run it and never bothered to read the manual. Thanks for the quick help!

On Thu, Dec 11, 2014 at 8:52 PM, Bastian Behrens notifications@github.com wrote:

this is standard jasmine syntax, and should be (and is) documented there http://jasmine.github.io/2.0/introduction.html#section-Spies:_%3Ccode%3EcreateSpyObj%3C/code

— Reply to this email directly or view it on GitHub https://github.com/jasmine-contrib/grunt-jasmine-node/issues/59#issuecomment-66633987 .