X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo%2FMooseX-Getopt.git;a=blobdiff_plain;f=t%2F004_nogetop.t;h=148682ef4cfbdba614c721ad2a9756e6301e0495;hp=c5c222c92d6f17104aadc43ea775e2a3b424b014;hb=aec092482d5b90b8279e4a5f92165868a78ddf32;hpb=d08ef824ff9b41efb8fbbc09fe6af178ef83080b diff --git a/t/004_nogetop.t b/t/004_nogetop.t index c5c222c..148682e 100644 --- a/t/004_nogetop.t +++ b/t/004_nogetop.t @@ -1,10 +1,9 @@ -#!/usr/bin/perl - use strict; -use warnings; +use warnings FATAL => 'all'; -use Test::More tests => 9; -use Test::Exception 0.21; +use Test::More tests => 10; +use Test::Fatal 0.003; +use Test::NoWarnings 1.04 ':early'; BEGIN { use_ok('MooseX::Getopt'); @@ -17,7 +16,7 @@ BEGIN { with 'MooseX::Getopt'; has 'data' => ( - metaclass => 'Getopt', + traits => ['Getopt'], is => 'ro', isa => 'Str', default => 'file.dat', @@ -25,7 +24,7 @@ BEGIN { ); has 'cow' => ( - metaclass => 'Getopt', + traits => ['Getopt'], is => 'ro', isa => 'Str', default => 'moo', @@ -33,7 +32,7 @@ BEGIN { ); has 'horse' => ( - metaclass => 'Getopt', + traits => ['Getopt'], is => 'ro', isa => 'Str', default => 'bray', @@ -65,20 +64,19 @@ BEGIN { ); has 'private_stuff' => ( - metaclass => 'NoGetopt', + traits => ['NoGetopt'], is => 'ro', isa => 'Int', default => 713 ); has '_private_stuff_cmdline' => ( - metaclass => 'Getopt', + traits => ['Getopt'], is => 'ro', isa => 'Int', default => 832, cmd_flag => 'p', ); - } { @@ -98,5 +96,5 @@ 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/; }