4 use Test::More tests => 11;
6 use Test::NoWarnings 1.04 ':early';
9 use_ok('MooseX::Getopt');
17 with 'MooseX::Getopt::Strict';
23 default => 'file.dat',
32 cmd_aliases => [qw/ moocow m c /],
58 default => sub { [] },
64 default => sub { {} },
67 has 'private_stuff' => (
77 my $app = App->new_with_options;
78 isa_ok( $app, 'App' );
80 ok( !$app->verbose, '... verbosity is off as expected' );
81 is( $app->length, 24, '... length is 24 as expected' );
82 is( $app->data, 'file.dat', '... data is file.dat as expected' );
83 is_deeply( $app->libs, [], '... libs is [] as expected' );
84 is_deeply( $app->details, {}, '... details is {} as expected' );
85 is($app->private_stuff, 713, '... private stuff is 713 as expected');
89 local @ARGV = (qw/--private_stuff 317/);
91 like exception { App->new_with_options }, qr/Unknown option: private_stuff/;
95 local @ARGV = (qw/--length 100/);
97 like exception { App->new_with_options }, qr/Unknown option: length/;