From: Matt S Trout Date: Sat, 16 Mar 2013 20:10:06 +0000 (+0000) Subject: clean up merge error in accessor generation test X-Git-Tag: v1.001000~3 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d4473ee321d7cff02630c85e9013db43176233b8;p=gitmo%2FMoo.git clean up merge error in accessor generation test --- diff --git a/t/method-generate-accessor.t b/t/method-generate-accessor.t index 3229052..87d2508 100644 --- a/t/method-generate-accessor.t +++ b/t/method-generate-accessor.t @@ -37,18 +37,13 @@ like( qr/Invalid coerce/, "coerce - scalar rejected" ); -for my $setting (qw( default coerce )) { - like( - exception { $gen->generate_method('Foo' => 'four' => { allow_overwrite => 1, is => 'ro', $setting => 5 }) }, - qr/Invalid $setting/, "$setting - scalar rejected" - ); - is( exception { $gen->generate_method('Foo' => 'four' => { is => 'ro', default => 5 }) }, undef, "default - non-ref scalar accepted" ); -for my $setting (qw( default coerce )) { +foreach my $setting (qw( default coerce )) { + like( exception { $gen->generate_method('Foo' => 'five' => { allow_overwrite => 1, is => 'ro', $setting => [] }) }, qr/Invalid $setting/, "$setting - arrayref rejected"