Last active
September 21, 2015 05:00
-
-
Save LoganBarnett/5c443053d6cff7e79b56 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe('my category', function() { | |
beforeEach(module('LocalForageModule')); | |
it('does stuff', function() { | |
inject(function($localForage) { | |
// test stuff goes here | |
}); | |
}); | |
}); | |
describe('elaborate test', function() { | |
// note we don't even include the local forage module anymore. | |
beforeEach(function() { | |
module('my_app.module', function($provide) { | |
var localForageMock = { | |
foo: jasmine.createSpy('foo') | |
}; | |
$provide.value('$localForage', localForageMock); | |
}); | |
}); | |
it('does stuff', function() { | |
inject(function($localForage) { | |
doStuff(); | |
expect($localForage.foo).toHaveBeenCalled(); | |
}); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment