Hey Billy,
If you namespace "foo" or otherwise hang it off some object, the spy
works as you're intending it to albiet with a little tweaking.
I have not looked into the Sinon source code to determine why passing
the constructor reference to the "spy" method directly doesn't work,
while passing a reference to the namespace (object) along with the
constructor function's name "foo" does. The difference in behavior
might better be explained by the author.
See linked fiddle:
http://jsfiddle.net/KXUHK/1/
Take care,
Erin
2013/2/10 Billy V. <
bil...@gmail.com>:
> --
> You received this message because you are subscribed to the Google Groups
> "Sinon.JS" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to
sinonjs+u...@googlegroups.com.
> For more options, visit
https://groups.google.com/groups/opt_out.
>
>