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