X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo%2FMouse.git;a=blobdiff_plain;f=t%2F020_attributes%2F027_accessor_override_method.t;fp=t%2F020_attributes%2Ffailing%2F027_accessor_override_method.t;h=6ad9219eec2782b22e87cb9c2dc3e74dc5020415;hp=8285b695ea807a29194fcbd62f5d662bec77fc71;hb=fde8e43f95fe996fbc2a778aa259feeb04552171;hpb=0bdc9d38dfd3de07aad929f6629f8fa65d434c27 diff --git a/t/020_attributes/failing/027_accessor_override_method.t b/t/020_attributes/027_accessor_override_method.t similarity index 73% rename from t/020_attributes/failing/027_accessor_override_method.t rename to t/020_attributes/027_accessor_override_method.t index 8285b69..6ad9219 100644 --- a/t/020_attributes/failing/027_accessor_override_method.t +++ b/t/020_attributes/027_accessor_override_method.t @@ -1,13 +1,14 @@ #!/usr/bin/env 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; use Test::More; -BEGIN { - eval "use Test::Output;"; - plan skip_all => "Test::Output is required for this test" if $@; - plan tests => 5; -} +use Test::Requires { + 'Test::Output' => '0.01', # skip all if not installed +}; { package Foo; @@ -31,3 +32,8 @@ stderr_like(sub { $foo_meta->add_attribute(d => (clearer => 'clear_d')) }, qr/^You are overwriting a locally defined method \(clear_d\) with an accessor/, 'clearer overriding gives proper warning'); stderr_like(sub { $foo_meta->add_attribute(e => (is => 'rw')) }, qr/^You are overwriting a locally defined method \(e\) with an accessor/, 'accessor overriding gives proper warning'); + +stderr_like(sub { $foo_meta->add_attribute(has => (is => 'rw')) }, + qr/^You are overwriting a locally defined function \(has\) with an accessor/, 'function overriding gives proper warning'); + +done_testing;