X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F300_immutable%2F007_immutable_trigger_from_constructor.t;fp=t%2F300_immutable%2F007_immutable_trigger_from_constructor.t;h=6e5cdb15723a9a46869e5e8a0bc7575c36052fb7;hb=16504b1548c2c3b2570a46b1864287f50d49faf2;hp=0ddcc5f97a7112e0b3c90d6f362b625f84d94c9e;hpb=ee5e6a034b6aeaed7819138193288eb249d9380b;p=gitmo%2FMouse.git diff --git a/t/300_immutable/007_immutable_trigger_from_constructor.t b/t/300_immutable/007_immutable_trigger_from_constructor.t index 0ddcc5f..6e5cdb1 100644 --- a/t/300_immutable/007_immutable_trigger_from_constructor.t +++ b/t/300_immutable/007_immutable_trigger_from_constructor.t @@ -1,4 +1,7 @@ #!/usr/bin/perl +# This is automatically generated by author/import-moose-test.pl. +# DO NOT EDIT THIS FILE. ANY CHANGES WILL BE LOST!!! +use t::lib::MooseCompat; use strict; use warnings; @@ -6,7 +9,6 @@ use warnings; use Test::More; use Test::Exception; -plan tests => 3; { package AClass; @@ -16,12 +18,12 @@ plan tests => 3; has 'foo' => (is => 'rw', isa => 'Maybe[Str]', trigger => sub { die "Pulling the Foo trigger\n" }); - - has 'bar' => (is => 'rw', isa => 'Maybe[Str]'); - + + has 'bar' => (is => 'rw', isa => 'Maybe[Str]'); + has 'baz' => (is => 'rw', isa => 'Maybe[Str]', trigger => sub { die "Pulling the Baz trigger\n" - }); + }); __PACKAGE__->meta->make_immutable; #(debug => 1); @@ -36,5 +38,4 @@ like ($@, qr/^Pulling the Baz trigger/, "trigger from immutable constructor"); lives_ok { AClass->new(bar => 'bar') } '... no triggers called'; - - +done_testing;