我最终要做的是获取模板缓存并将视图放入其中。我没有控制不使用ngMock,事实证明:
beforeEach(inject(function(_$rootScope_, _$compile_, $templateCache) { $scope = _$rootScope_; $compile = _$compile_; $templateCache.put('path/to/template.html', '<div>Here goes the template</div>');}));


