I was calling the method before setting up the should.receive. At
On May 18, 12:59 pm, Roy Kolak <
roy.ko...@gmail.com> wrote:
> Yes I have. The failure is the same.
>
>
>
>
>
> On Tue, May 18, 2010 at 11:58 AM, Kevin Gisi <
ke...@kevingisi.com> wrote:
> > Have you tried document rather than window?
>
> > On 5/18/10, Roy Kolak <
roy.ko...@gmail.com> wrote:
> > > I'm trying to stub a global function (yeah... third party crap).
> > > Here's my approach
>
> > > it 'should call multiTrack'
> > > stub(window, 'dcsMultiTrack')
>
> > > // Direct call, just for testing...
> > > dcsMultiTrack()
>
> > > expect(window).to(receive, 'dcsMultiTrack');
> > > end
>
> > > This is the result:
> > > "expected [object DOMWindow].dcsMultiTrack() to be called once, but
> > > was not called"
>
> > > Can't seem to track why this error is the outcome. Anyone encounter
> > > this behavior before?
>
> > > --
> > > JSpec thanks you for your interest and support! To post simply reply
> > > to this email.
>
> > > documentation:
http://jspec.info