X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F010_dashes.t;fp=t%2F010_dashes.t;h=52b784947c1d26bf7592573360f4c7b037d2ec7e;hb=fe193b814520900810bc4c0e6d9819d444b26930;hp=2927daecb346dc1dafc435956f74832ad7a01572;hpb=ceeaabeb2c434c734638bab55c728647c34d2c9a;p=gitmo%2FMooseX-Getopt.git diff --git a/t/010_dashes.t b/t/010_dashes.t index 2927dae..52b7849 100644 --- a/t/010_dashes.t +++ b/t/010_dashes.t @@ -9,35 +9,35 @@ use Test::Exception; BEGIN { - use_ok('MooseX::Getopt'); + use_ok('MooseX::Getopt'); } { - package App; - use Moose; + package App; + use Moose; - with 'MooseX::Getopt::Dashes'; + with 'MooseX::Getopt::Dashes'; - has 'some_thingy' => ( is => 'ro', isa => 'Str', default => 'foo' ); - has 'another_thingy' => ( is => 'ro', isa => 'Str', default => 'foo', cmd_flag => 'another_thingy', traits => [ 'Getopt' ], ); + has 'some_thingy' => ( is => 'ro', isa => 'Str', default => 'foo' ); + has 'another_thingy' => ( is => 'ro', isa => 'Str', default => 'foo', cmd_flag => 'another_thingy', traits => [ 'Getopt' ], ); } { - local @ARGV = (qw/--some-thingy bar/); - lives_and { is( App->new_with_options->some_thingy, 'bar') } 'Dash in option name'; + local @ARGV = (qw/--some-thingy bar/); + lives_and { is( App->new_with_options->some_thingy, 'bar') } 'Dash in option name'; } { - local @ARGV = (qw/--some_thingy bar/); - throws_ok { App->new_with_options } qr/Unknown option: some_thingy/; + local @ARGV = (qw/--some_thingy bar/); + throws_ok { App->new_with_options } qr/Unknown option: some_thingy/; } { - local @ARGV = (qw/--another_thingy bar/); - lives_and { is( App->new_with_options->another_thingy, 'bar' ) } 'Underscore in option name'; + local @ARGV = (qw/--another_thingy bar/); + lives_and { is( App->new_with_options->another_thingy, 'bar' ) } 'Underscore in option name'; } { - local @ARGV = (qw/--another-thingy bar/); - throws_ok { App->new_with_options } qr/Unknown option: another-thingy/; + local @ARGV = (qw/--another-thingy bar/); + throws_ok { App->new_with_options } qr/Unknown option: another-thingy/; }