foo
[gitmo/MooseX-Getopt.git] / t / 004_nogetop.t
index 03b09db..b0fa16d 100644 (file)
@@ -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/;
+}