updated to use 'stubs' when mocking with Mocha instead of RSpec