b9e694e38dc0ea1e79f5e0947014f0aa4c6d40e5
[gitmo/MooseX-Getopt.git] / t / 103_uc_bug.t
1 use strict;
2 use warnings;
3
4 use Test::More tests => 4;
5 use Test::NoWarnings 1.04 ':early';
6
7 {
8     package App;
9     use Moose;
10     with qw(MooseX::Getopt);
11
12     has 'TrackingNumber' => (
13         is  => 'rw',
14         isa => 'Str',
15     );
16
17     has 'otherparam' => (
18         is  => 'rw',
19         isa => 'Str',
20     );
21 }
22
23 {
24     local @ARGV = ('--TrackingNumber','1Z1234567812345670','--otherparam','foo');
25
26     my $app = App->new_with_options;
27     isa_ok($app, 'App');
28     is($app->TrackingNumber, '1Z1234567812345670', '... TrackingNumber is as expected');
29     is($app->otherparam, 'foo', '... otherparam is as expected');
30 }