X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F010_basics%2F030_deprecations.t;fp=t%2F010_basics%2F030_deprecations.t;h=3354f2e1c28f36708525db0f38efe80a9282c6e4;hb=4c52e860380be0f4c928cd0171c4f4127edacaaf;hp=7074266626ef09266153e33f05a6db75fd3da51d;hpb=a8eb9fe077a08efb845facc0ba156a79682fa546;p=gitmo%2FMoose.git diff --git a/t/010_basics/030_deprecations.t b/t/010_basics/030_deprecations.t index 7074266..3354f2e 100644 --- a/t/010_basics/030_deprecations.t +++ b/t/010_basics/030_deprecations.t @@ -49,7 +49,7 @@ use Test::Requires { ::stderr_like{ with 'Role' => { excludes => ['thing'], alias => { thing => 'thing2' } }; } - qr/\QThe alias and excludes options for role application have been renamed -alias and -excludes (applying Role to Foo - do you need to upgrade Foo?)/, + qr/\QThe alias and excludes options for role application have been renamed -alias and -excludes (Foo is consuming Role - do you need to upgrade Foo?)/, 'passing excludes or alias with a leading dash warns'; ::ok( !Foo->meta->has_method('thing'), @@ -59,8 +59,9 @@ use Test::Requires { Foo->meta->has_method('thing2'), 'thing2 method is created as alias in role application' ); - } ); - } + } + ); +} { package Pack1; @@ -164,6 +165,18 @@ use Test::Requires { q{}, 'Providing a accessor for a String trait avoids default is warning'; } +<<<<<<< HEAD +======= + qr/\QThe alias and excludes options for role application have been renamed -alias and -excludes (Foo is consuming Role - do you need to upgrade Foo?)/, + 'passing excludes or alias with a leading dash warns'; + ::ok( + !Foo->meta->has_method('thing'), + 'thing method is excluded from role application' + ); + ::ok( + Foo->meta->has_method('thing2'), + 'thing2 method is created as alias in role application' +>>>>>>> Move logic into Moose::Meta::Role for deprecation check of excludes and alias. Add friendlier wording to the warning. Update the test to check for new wording ); sub _build_foo { q{} }