From d1fdb822911ed06c206fdb5fc75938d0742ed327 Mon Sep 17 00:00:00 2001 From: kpdecker Date: Sat, 19 Jan 2013 13:19:03 -0600 Subject: [PATCH] Make equals without messages more resilient When called without a message parameter the tests would fail under some environments. I'm not clear on what is causing the failure, perhaps ruby version, but this patch cleans up the issues there. --- spec/qunit_spec.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/spec/qunit_spec.js b/spec/qunit_spec.js index fb78c37c..159576d8 100644 --- a/spec/qunit_spec.js +++ b/spec/qunit_spec.js @@ -20,6 +20,12 @@ if (!Handlebars) { return Handlebars.compile(template, options); } }; +} else { + var _equal = equal; + equals = equal = function(a, b, msg) { + // Allow exec with missing message params + _equal(a, b, msg || ''); + }; } suite("basic context");