Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
slightly more consistent command tests
  • Loading branch information
kraih committed Jun 3, 2016
1 parent 05c3101 commit 8c68d3f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Mojolicious/Guides/Contributing.pod
Expand Up @@ -191,7 +191,7 @@ that the project your product relies on stays healthy and actively maintained.
It can also help your exposure within the community and will make it easier to
attract L<Mojolicious> developers.

Please email C<sri@cpan.org> if you have any questions regarding sponsorships.
Please email C<sri@cpan.org> if you have any questions regarding sponsorship.

=head1 CODE OF CONDUCT

Expand Down
4 changes: 4 additions & 0 deletions t/mojolicious/command.t
Expand Up @@ -32,12 +32,14 @@ $buffer = '';
$command->create_rel_dir('foo/bar');
}
like $buffer, qr/\[exist\]/, 'right output';
chdir $cwd;

# Generating files
my $template = "@@ foo_bar\njust <%= 'works' %>!\n";
open my $data, '<', \$template;
no strict 'refs';
*{"Mojolicious::Command::DATA"} = $data;
chdir $dir;
$buffer = '';
{
open my $handle, '>', \$buffer;
Expand Down Expand Up @@ -71,8 +73,10 @@ $buffer = '';
like $buffer, qr/\[exist\]/, 'right output';
open my $xml, '<', $command->rel_file('123.xml');
is join('', <$xml>), "seems\nto\nwork", 'right result';
chdir $cwd;

# Quiet
chdir $dir;
$buffer = '';
{
open my $handle, '>', \$buffer;
Expand Down

0 comments on commit 8c68d3f

Please sign in to comment.