diff options
| author | Misko Hevery | 2012-01-12 11:06:10 -0800 | 
|---|---|---|
| committer | Misko Hevery | 2012-01-12 13:40:07 -0800 | 
| commit | d648d709f3edcac56132e9e2a84a0fc65f5b48ac (patch) | |
| tree | ac0ba5763838a4f4b880dc72f0cbcedc1b7abc05 /test/AngularSpec.js | |
| parent | 9a8dbfef5151e8e92dc010a597b670e7687ebe9b (diff) | |
| download | angular.js-d648d709f3edcac56132e9e2a84a0fc65f5b48ac.tar.bz2 | |
refactor(module): strict separation between module-config / app-runtime
Diffstat (limited to 'test/AngularSpec.js')
| -rw-r--r-- | test/AngularSpec.js | 22 | 
1 files changed, 12 insertions, 10 deletions
| diff --git a/test/AngularSpec.js b/test/AngularSpec.js index 55842acd..0ff0508f 100644 --- a/test/AngularSpec.js +++ b/test/AngularSpec.js @@ -346,18 +346,21 @@ describe('angular', function() {    describe('angular service', function() { -    it('should override services', inject(function($provide){ -      $provide.value('fake', 'old'); -      $provide.value('fake', 'new'); -    }, function(fake) { -      expect(fake).toEqual('new'); -    })); +    it('should override services', function() { +      module(function($provide){ +        $provide.value('fake', 'old'); +        $provide.value('fake', 'new'); +      }); +      inject(function(fake) { +        expect(fake).toEqual('new'); +      }); +    });      it('should inject dependencies specified by $inject and ignore function argument name', function() { -      expect(angular.injector(function($provide){ +      expect(angular.injector([function($provide){          $provide.factory('svc1', function() { return 'svc1'; });          $provide.factory('svc2', ['svc1', function(s) { return 'svc2-' + s; }]); -      }).get('svc2')).toEqual('svc2-svc1'); +      }]).get('svc2')).toEqual('svc2-svc1');      });    }); @@ -492,8 +495,7 @@ describe('angular', function() {    describe('bootstrap', function() {      it('should bootstrap app', function(){        var element = jqLite('<div>{{1+2}}</div>'); -      var injector; -      angular.bootstrap(element, [function($injector){ injector = $injector; }]); +      var injector = angular.bootstrap(element);        expect(injector).toBeDefined();        expect(element.data('$injector')).toBe(injector);        dealoc(element); | 
