diff --git a/docs/content/tutorial/step_04.ngdoc b/docs/content/tutorial/step_04.ngdoc index df1b23ec7e9f..c2edf57397a2 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);