So I\'ve read many posts but no suggestions as worked so far.
I am wanting to mock a module - say angular-foo. The original file is loaded along with everything else
What did the trick for me was putting the provider before the module declaration:
beforeEach(module(function($provide) {
$provide.provider('myProvider', function() {
return {
myProviderFunction: function() {},
$get: function () {
return {
myProviderFunction: function() {}
};
}
};
});
}));
beforeEach(module('myApp'));