From a87f2fb9e4d65ac5d260e914b5e31aa0e0f47b2c Mon Sep 17 00:00:00 2001 From: Misko Hevery Date: Fri, 4 Nov 2011 12:33:01 -0700 Subject: refactor(mock): moved mocks into its own module --- test/scenario/RunnerSpec.js | 4 ++-- test/scenario/matchersSpec.js | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'test/scenario') diff --git a/test/scenario/RunnerSpec.js b/test/scenario/RunnerSpec.js index 62d84fca..15bcc4b0 100644 --- a/test/scenario/RunnerSpec.js +++ b/test/scenario/RunnerSpec.js @@ -46,8 +46,8 @@ describe('angular.scenario.Runner', function() { runner.createSpecRunner_ = function(scope) { return scope.$new(MockSpecRunner); }; - runner.on('SpecError', rethrow); - runner.on('StepError', rethrow); + runner.on('SpecError', angular.mock.rethrow); + runner.on('StepError', angular.mock.rethrow); }); afterEach(function() { diff --git a/test/scenario/matchersSpec.js b/test/scenario/matchersSpec.js index 7ab41cf2..7a5217d7 100644 --- a/test/scenario/matchersSpec.js +++ b/test/scenario/matchersSpec.js @@ -42,4 +42,10 @@ describe('angular.scenario.matchers', function () { expectMatcher(3, function() { matchers.toBeLessThan(10); }); expectMatcher(3, function() { matchers.toBeGreaterThan(-5); }); }); + + it('should have toHaveClass matcher', function(){ + var e = angular.element('
'); + expect(e).not.toHaveClass('none'); + expect(e).toHaveClass('abc'); + }); }); -- cgit v1.2.3