X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F004_nogetop.t;fp=t%2F004_nogetop.t;h=b0fa16dfd86bf96c0bfec3dd1fe7fe9d81b223c8;hb=bff3807bb402a84be10c48d2e4d1be0628fde911;hp=03b09db33adce00b14a1a581b51f3adbfc94f7d7;hpb=a01f08fb1f7451412f578e905179324dfd2ec590;p=gitmo%2FMooseX-Getopt.git diff --git a/t/004_nogetop.t b/t/004_nogetop.t index 03b09db..b0fa16d 100644 --- a/t/004_nogetop.t +++ b/t/004_nogetop.t @@ -3,7 +3,8 @@ use strict; use warnings; -use Test::More tests => 8; +use Test::More tests => 9; +use Test::Exception; BEGIN { use_ok('MooseX::Getopt'); @@ -94,3 +95,9 @@ BEGIN { is_deeply( $app->details, {}, '... details is {} as expected' ); is($app->private_stuff, 713, '... private stuff is 713 as expected'); } + +{ + local @ARGV = (qw/--private_stuff 317/); + + throws_ok { App->new_with_options } qr/Unknown option: private_stuff/; +}