Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix test failing if Moose is not installed
Move the new test to t/from.t which already checks for Moose.
  • Loading branch information
niner committed Jul 6, 2015
1 parent 3325ebd commit 7bfcb32
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
3 changes: 0 additions & 3 deletions t/from.t
Expand Up @@ -11,9 +11,6 @@ eval-dies-ok "use P5ModuleVersion:from<Perl5>:ver<2.1>;";

is(P5Import::ok(1), 1);

use Foo:from<Perl5>;
is(Foo.new(foo => 'custom').foo, 'custom');

done;

# vim: ft=perl6
6 changes: 4 additions & 2 deletions t/inherit.t
Expand Up @@ -4,18 +4,20 @@ use v6;
use Test;

BEGIN {
plan 9; # adjust the skip as well!
plan 10; # adjust the skip as well!

EVAL 'use lib qw(t/lib);', :lang<perl5>;
unless EVAL 'eval { require Moose; 1};', :lang<perl5> {
skip('Perl 5 Moose module not available', 9);
skip('Perl 5 Moose module not available', 10);
exit;
}
}

use Foo:from<Perl5>;
use Bar:from<Perl5>;

is(Foo.new(foo => 'custom').foo, 'custom');

class P6Bar is Foo {
method bar {
return "Perl6";
Expand Down

0 comments on commit 7bfcb32

Please sign in to comment.