Using Jasmine spies to verify dependencies