You should load the module of the part you want to test and generate a mock module, which provides the spies.
beforeEach(function () {
module('ModuleUnderTest', function($provide) {
var windowMock = {
plugins: {
anotherPlugin: jasmine.createSpyObj('anotherPlugin', ['foo', 'bar'])
}
};
// substitute all dependencies with mocks
$provide.value('$window', windowMock);
});
});
Beware, I have not tested the code, but you should get the gist.