X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo%2FMouse.git;a=blobdiff_plain;f=t%2F020_attributes%2Ffailing%2F027_accessor_override_method.t;fp=t%2F020_attributes%2Ffailing%2F027_accessor_override_method.t;h=0000000000000000000000000000000000000000;hp=8285b695ea807a29194fcbd62f5d662bec77fc71;hb=c47cf41554416ee1828eab17d31342a53aaa0839;hpb=9864f0e4ba233c5f30ad6dc7c484ced43d883d27 diff --git a/t/020_attributes/failing/027_accessor_override_method.t b/t/020_attributes/failing/027_accessor_override_method.t deleted file mode 100644 index 8285b69..0000000 --- a/t/020_attributes/failing/027_accessor_override_method.t +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/bin/env perl -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; -} - -{ - package Foo; - use Mouse; - - sub get_a { } - sub set_b { } - sub has_c { } - sub clear_d { } - sub e { } -} - -my $foo_meta = Foo->meta; -stderr_like(sub { $foo_meta->add_attribute(a => (reader => 'get_a')) }, - qr/^You are overwriting a locally defined method \(get_a\) with an accessor/, 'reader overriding gives proper warning'); -stderr_like(sub { $foo_meta->add_attribute(b => (writer => 'set_b')) }, - qr/^You are overwriting a locally defined method \(set_b\) with an accessor/, 'writer overriding gives proper warning'); -stderr_like(sub { $foo_meta->add_attribute(c => (predicate => 'has_c')) }, - qr/^You are overwriting a locally defined method \(has_c\) with an accessor/, 'predicate overriding gives proper warning'); -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');