diff options
Diffstat (limited to 'test/angular-mocksSpec.js')
| -rw-r--r-- | test/angular-mocksSpec.js | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/test/angular-mocksSpec.js b/test/angular-mocksSpec.js index c2cffca6..205461af 100644 --- a/test/angular-mocksSpec.js +++ b/test/angular-mocksSpec.js @@ -226,11 +226,8 @@ describe('mocks', function() { describe('$exceptionHandler', function() { - it('should rethrow exceptions', function() { - var rootScope = angular.scope(), - exHandler = rootScope.$service('$exceptionHandler'); - - expect(function() { exHandler('myException'); }).toThrow('myException'); - }); + it('should rethrow exceptions', inject(function($exceptionHandler) { + expect(function() { $exceptionHandler('myException'); }).toThrow('myException'); + })); }); }); |
