summaryrefslogtreecommitdiffstats
path: root/spec/builtins.js
diff options
context:
space:
mode:
authorkpdecker <kpdecker@gmail.com>2015-02-07 13:22:31 -0600
committerkpdecker <kpdecker@gmail.com>2015-02-07 13:23:10 -0600
commitcfbef2585df36a92d2bcac0a025c39aea37fedb1 (patch)
treeeaaf21f00ce9811ab9c6349e06a85c3cba01467d /spec/builtins.js
parent95421271e3badfcb340cda53434109feed44889a (diff)
downloadhandlebars.js-cfbef2585df36a92d2bcac0a025c39aea37fedb1.zip
handlebars.js-cfbef2585df36a92d2bcac0a025c39aea37fedb1.tar.gz
handlebars.js-cfbef2585df36a92d2bcac0a025c39aea37fedb1.tar.bz2
Fail over to console.log if lacking console method
This improves logger resiliency under older browsers.
Diffstat (limited to 'spec/builtins.js')
-rw-r--r--spec/builtins.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/spec/builtins.js b/spec/builtins.js
index 8f20da1..75af236 100644
--- a/spec/builtins.js
+++ b/spec/builtins.js
@@ -276,7 +276,7 @@ describe('builtin helpers', function() {
equals(3, levelArg);
equals("whee", logArg);
});
- it('should not output to info', function() {
+ it('should output to info', function() {
var string = "{{log blah}}";
var hash = { blah: "whee" };
@@ -284,6 +284,10 @@ describe('builtin helpers', function() {
equals("whee", log);
called = true;
};
+ console.log = function(log) {
+ equals("whee", log);
+ called = true;
+ };
shouldCompileTo(string, hash, "");
equals(true, called);