X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F005_strict.t;h=03eaf50a2a625d037cf7a4fc0da3ba5398464c98;hb=9fbb5be9dcf64475fb6f4d25807db1e952be2365;hp=206cb64852ad1efc7c47effa5b97ee997685708d;hpb=6634c7e22aaaeeeafaf479f03c19133e7922954d;p=gitmo%2FMooseX-Getopt.git diff --git a/t/005_strict.t b/t/005_strict.t index 206cb64..03eaf50 100644 --- a/t/005_strict.t +++ b/t/005_strict.t @@ -1,10 +1,9 @@ -#!/usr/bin/perl - use strict; use warnings; -use Test::More tests => 10; -use Test::Exception; +use Test::More tests => 11; +use Test::Fatal; +use Test::NoWarnings 1.04 ':early'; BEGIN { use_ok('MooseX::Getopt'); @@ -34,7 +33,7 @@ BEGIN { ); has 'horse' => ( - metaclass => 'Getopt', + traits => ['Getopt'], is => 'ro', isa => 'Str', default => 'bray', @@ -89,12 +88,12 @@ BEGIN { { local @ARGV = (qw/--private_stuff 317/); - throws_ok { App->new_with_options } qr/Unknown option: private_stuff/; + like exception { App->new_with_options }, qr/Unknown option: private_stuff/; } { local @ARGV = (qw/--length 100/); - throws_ok { App->new_with_options } qr/Unknown option: length/; + like exception { App->new_with_options }, qr/Unknown option: length/; }