Cleanup test, removing unneeded code serving no purpose or tested elsewhere
[gitmo/MooseX-Getopt.git] / t / 101_argv_bug.t
1 #!/usr/bin/env perl
2
3 use strict;
4 use warnings;
5
6 use Test::More tests => 3;
7
8 use MooseX::Getopt;
9
10 {
11     package App;
12     use Moose;
13
14     with 'MooseX::Getopt';
15
16     has 'length' => (
17         is      => 'ro',
18         isa     => 'Int',
19         default => 24,
20     );
21
22     has 'verbose' => (
23         is     => 'ro',
24         isa    => 'Bool',
25         default => 0,
26     );
27     no Moose;
28 }
29
30 {
31     my $app = App->new_with_options(argv => [ '--verbose', '--length', 50 ]);
32     isa_ok($app, 'App');
33
34     ok($app->verbose, '... verbosity is turned on as expected');
35     is($app->length, 50, '... length is 50 as expected');
36 }
37