From: Shawn M Moore Date: Wed, 16 Jul 2008 05:04:33 +0000 (+0000) Subject: splice out the trigger results so we ensure we don't call trigger extra times X-Git-Tag: 0.19~260 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=c0085d110254666a6c56c67c586f1b5c3d54d7db;p=gitmo%2FMouse.git splice out the trigger results so we ensure we don't call trigger extra times --- diff --git a/t/016-trigger.t b/t/016-trigger.t index d316599..2925a8e 100644 --- a/t/016-trigger.t +++ b/t/016-trigger.t @@ -37,9 +37,9 @@ is(@trigger, 0, "trigger not called on read"); is($object->attr(50), 50, "setting the value"); is(@trigger, 1, "trigger was called on read"); -is_deeply(shift(@trigger), [$object, 50, $object->meta->get_attribute('attr')], "correct arguments to trigger in the accessor"); +is_deeply([splice @trigger], [[$object, 50, $object->meta->get_attribute('attr')]], "correct arguments to trigger in the accessor"); my $object2 = Class->new(attr => 100); is(@trigger, 1, "trigger was called on new with the attribute specified"); -is_deeply(shift(@trigger), [$object2, 100, $object2->meta->get_attribute('attr')], "correct arguments to trigger in the constructor"); +is_deeply([splice @trigger], [[$object2, 100, $object2->meta->get_attribute('attr')]], "correct arguments to trigger in the constructor");