From 584ccf16568d48e7de53442f5163453a0a8c3373 Mon Sep 17 00:00:00 2001 From: Amos Haviv Date: Thu, 6 Mar 2014 01:46:47 +0200 Subject: [PATCH] FIxing Jasmine tests to fit new version --- public/modules/articles/tests/articles.spec.js | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/public/modules/articles/tests/articles.spec.js b/public/modules/articles/tests/articles.spec.js index 42903a0f8a..a1d1599016 100644 --- a/public/modules/articles/tests/articles.spec.js +++ b/public/modules/articles/tests/articles.spec.js @@ -17,12 +17,18 @@ // When the toEqualData matcher compares two objects, it takes only object properties into // account and ignores methods. beforeEach(function() { - this.addMatchers({ - toEqualData: function(expected) { - return angular.equals(this.actual, expected); - } - }); - }); + jasmine.addMatchers({ + toEqualData: function(util, customEqualityTesters) { + return { + compare: function(actual, expected) { + return { + pass: angular.equals(actual, expected) + }; + } + }; + } + }); + }); // Then we can start by loading the main application module beforeEach(module('mean'));