4 use Test::More tests => 11;
6 use Test::NoWarnings 1.04 ':early';
9 use_ok('MooseX::Getopt');
16 with 'MooseX::Getopt::Strict';
22 default => 'file.dat',
31 cmd_aliases => [qw/ moocow m c /],
57 default => sub { [] },
63 default => sub { {} },
66 has 'private_stuff' => (
76 my $app = App->new_with_options;
77 isa_ok( $app, 'App' );
79 ok( !$app->verbose, '... verbosity is off as expected' );
80 is( $app->length, 24, '... length is 24 as expected' );
81 is( $app->data, 'file.dat', '... data is file.dat as expected' );
82 is_deeply( $app->libs, [], '... libs is [] as expected' );
83 is_deeply( $app->details, {}, '... details is {} as expected' );
84 is($app->private_stuff, 713, '... private stuff is 713 as expected');
88 local @ARGV = (qw/--private_stuff 317/);
90 like exception { App->new_with_options }, qr/Unknown option: private_stuff/;
94 local @ARGV = (qw/--length 100/);
96 like exception { App->new_with_options }, qr/Unknown option: length/;