diff options
Diffstat (limited to 'docs/content/tutorial')
| -rw-r--r-- | docs/content/tutorial/step_04.ngdoc | 11 | 
1 files changed, 6 insertions, 5 deletions
| diff --git a/docs/content/tutorial/step_04.ngdoc b/docs/content/tutorial/step_04.ngdoc index df1b23ec..c2edf573 100644 --- a/docs/content/tutorial/step_04.ngdoc +++ b/docs/content/tutorial/step_04.ngdoc @@ -112,11 +112,12 @@ describe('PhoneCat controllers', function() {    describe('PhoneListCtrl', function(){      var scope, ctrl; -    beforeEach(function() { -      scope = {}, -      ctrl = new PhoneListCtrl(scope); -    }); - +    beforeEach(module('phonecatApp')); +     +    beforeEach(inject(function($controller) { +      scope = {}; +      ctrl = $controller('PhoneListCtrl', {$scope:scope}); +    }));      it('should create "phones" model with 3 phones', function() {        expect(scope.phones.length).toBe(3); | 
