demonstrating mocking, stubbing, spying in rspec and jasmine