Skip to content

Instantly share code, notes, and snippets.

Created January 20, 2015 08:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/019113a9e428724343cc to your computer and use it in GitHub Desktop.
Save anonymous/019113a9e428724343cc to your computer and use it in GitHub Desktop.
describe('Service: myService', function () {
var commonModuleMock;
var rijkshuisstijlAppMock;
var ngResourceMock;
beforeEach(module('appModule'));
beforeEach(function () {
commonModuleMock = jasmine.createSpy('commonModule');
reichshausstijlAppMock = jasmine.createSpy('reichshausstijlApp');
ngResourceMock = jasmine.createSpy('reichshausstijlApp');
module(function ($provide) {
$provide.value('commonModule', commonModuleMock);
$provide.value('rijkshuisstijlApp', reichshausstijlAppMock);
$provide.value('ngResource', ngResourceMock);
});
});
it('should return value from mock dependency', inject(function (appCtrl) {
expect(true).toBe(true);
}));
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment