From 9aec625fec733fe5925b5b1d131cf1457ceaeec0 Mon Sep 17 00:00:00 2001 From: Shai Reznik Date: Sun, 20 Jan 2013 01:23:03 +0200 Subject: [PATCH] doc(tutorial): Fix confusing test filter injection While doing some TDD, I've noticed that you can't really inject controllers, directives and filters. So I didn't understand how is this unit test passing, in my runner it throws an error. Shouldn't we use the $filter instead of asking directly the filter name? (like controllers?) --- docs/content/tutorial/step_09.ngdoc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/content/tutorial/step_09.ngdoc b/docs/content/tutorial/step_09.ngdoc index dbc455c9413e..3e88346adb1c 100644 --- a/docs/content/tutorial/step_09.ngdoc +++ b/docs/content/tutorial/step_09.ngdoc @@ -99,7 +99,8 @@ describe('filter', function() { describe('checkmark', function() { it('should convert boolean values to unicode checkmark or cross', - inject(function(checkmarkFilter) { + inject(function($filter) { + var checkmarkFilter = $filter("checkmarkFilter"); expect(checkmarkFilter(true)).toBe('\u2713'); expect(checkmarkFilter(false)).toBe('\u2718'); }));