Skip to content

Commit

Permalink
test the description too
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Nov 12, 2015
1 parent d6ac6e2 commit 595add3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions t/mojolicious/commands.t
Expand Up @@ -18,6 +18,8 @@ package Mojolicious::Command::my_fake_test_command;
package Mojolicious::Command::my_test_command;
use Mojo::Base 'Mojolicious::Command';

has description => 'See, it works';

package main;

# Make sure @ARGV is not changed
Expand Down Expand Up @@ -107,6 +109,7 @@ my $buffer = '';
like $buffer,
qr/Usage: APPLICATION COMMAND \[OPTIONS\].*daemon.*my_test_command.*version/s,
'right output';
like $buffer, qr/See, it works/, 'description has been picked up';
unlike $buffer, qr/my_fake_test_command/, 'fake command has been ignored';

# help
Expand Down

0 comments on commit 595add3

Please sign in to comment.