diff --git a/ext/update_helper/prototype_update_helper.html b/ext/update_helper/prototype_update_helper.html index 72d49a6..af5fda4 100644 --- a/ext/update_helper/prototype_update_helper.html +++ b/ext/update_helper/prototype_update_helper.html @@ -45,8 +45,8 @@ var actualType = log.type.beforeLast() || log.type.last(); this.assertEqual(expected, actualMessage, 'assertInfoNotified'); this.assertEqual('info', actualType, 'assertInfoNotified'); - log.message.push(null); - log.type.push(null); + log.message.length = 0; + log.type.length = 0; }, assertErrorNotified: function(expected) { @@ -54,8 +54,8 @@ var actualType = log.type.beforeLast() || log.type.last(); this.assertEqual(expected, actualMessage, 'assertErrorNotified'); this.assertEqual('error', actualType, 'assertErrorNotified'); - log.message.push(null); - log.type.push(null); + log.message.length = 0; + log.type.length = 0; }, assertWarnNotified: function(expected) { @@ -63,15 +63,19 @@ var actualType = log.type.beforeLast() || log.type.last(); this.assertEqual(expected, actualMessage, 'assertWarnNotified'); this.assertEqual('warn', actualType, 'assertWarnNotified'); - log.message.push(null); - log.type.push(null); + log.message.length = 0; + log.type.length = 0; }, assertNotNotified: function() { - this.assertNull(log.message.last(), 'assertNotNotified'); - this.assertNull(log.type.last()); - log.message.push(null); - log.type.push(null); + this.assertEmpty(log.message, 'assertNotNotified'); + this.assertEmpty(log.type, 'assertNotNotified'); + log.message.length = 0; + log.type.length = 0; + }, + + assertEmpty: function(array, message) { + this.assertEqual(0, array.length, message || ''); } });