diff --git a/test/unit/behaviors.html b/test/unit/behaviors.html index daafb592cb..27535891e3 100644 --- a/test/unit/behaviors.html +++ b/test/unit/behaviors.html @@ -414,11 +414,7 @@ }); test('behavior is null generates warning', function() { - var warned = false, oldWarn = Polymer._warn; - Polymer._warn = function(message) { - assert.match(message, /behavior is null/); - warned = true; - }; + sinon.spy(console, 'warn'); Polymer({ is: 'behavior-null', behaviors: [ @@ -426,8 +422,8 @@ ] }); document.createElement('behavior-null'); - assert.equal(warned, true, 'Null behaviour should generate warning'); - Polymer.Base._warn = oldWarn; + assert.equal(console.warn.callCount, 1, 'Null behaviour should generate warning'); + console.warn.restore(); }); test('behavior array is unique', function() {