X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F016-trigger.t;h=2f3a666815df3500c449902c74af134a42bdd926;hb=4dd75d5701a927ee1e6aa1b2d3c765ae0545b8e8;hp=99bf94253baebccb2cfff0554df4559c5f4dd87f;hpb=ca7941e5f5a56ef4e0c61835538c505645152085;p=gitmo%2FMouse.git diff --git a/t/016-trigger.t b/t/016-trigger.t index 99bf942..2f3a666 100644 --- a/t/016-trigger.t +++ b/t/016-trigger.t @@ -1,7 +1,7 @@ #!/usr/bin/env perl use strict; use warnings; -use Test::More tests => 10; +use Test::More tests => 11; use Test::Exception; my @trigger; @@ -31,7 +31,7 @@ do { is => 'ro', trigger => [], ); - } qr/Trigger must be a CODE or HASH ref on attribute \(error\)/; + } qr/Trigger must be a CODE ref on attribute \(error\)/; }; can_ok(Class => 'attr'); @@ -44,9 +44,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([splice @trigger], [[$object, 50, $object->meta->get_attribute('attr')]], "correct arguments to trigger in the accessor"); +is_deeply([splice @trigger], [[$object, 50, undef]], "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([splice @trigger], [[$object2, 100, $object2->meta->get_attribute('attr')]], "correct arguments to trigger in the constructor"); +is_deeply([splice @trigger], [[$object2, 100, undef]], "correct arguments to trigger in the constructor");