One test had to change, as it assumed the port number would have been set,
when the method was never called. Calling the method to get the port number
fixes this, by allowing the lazy method to actually be run before the value
is used.
cmd_aliases => 'p',
isa => 'Int',
is => 'ro',
+ lazy => 1,
default => sub {
Catalyst::Utils::env_value(shift->application_name, 'port') || 3000
},
cmd_aliases => 'r',
isa => 'Bool',
is => 'ro',
+ lazy => 1,
default => sub {
Catalyst::Utils::env_value(shift->application_name, 'reload') || 0;
},
## Check a few args
is_deeply $app->{ARGV}, $argstring;
- is $app->{port}, '3000';
+ is $app->port, '3000';
is($app->{background}, 1);
}