Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Tests for new "declarator [qw/foo bar baz/]" MXMS functionality #1

Open
wants to merge 1 commit into from

1 participant

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 15 additions and 3 deletions.
  1. +15 −3 t/modifiers.t
View
18 t/modifiers.t
@@ -10,14 +10,26 @@ role Bar {
}
}
-class Foo with Bar {
+role Baz {
+ after [qw/do_foo do_boo/] {
+ push @log, { after => 'string' };
+ }
+}
+
+class Foo with (Bar, Baz) {
method do_foo {
push @log, { class => 'string' };
}
+
+ method do_boo {
+ push @log, { also_class => 'another string' };
+ }
}
-Foo->new->do_foo;
+my $foo = Foo->new();
+$foo->do_foo;
+$foo->do_boo;
-is_deeply(\@log, [{'before', 'string'}, {'class','string'}] );
+is_deeply(\@log, [{'before', 'string'}, {'class','string'}, {'after', 'string'}, {'also_class', 'another string'}, {'after', 'string'}] );
done_testing;
Something went wrong with that request. Please try again.