[libmoo-perl] 22/43: test Moo's create_class_with_roles, not Role::Tiny's
gregor herrmann
gregoa at debian.org
Mon Dec 26 17:56:15 UTC 2016
This is an automated email from the git hooks/post-receive script.
gregoa pushed a commit to branch master
in repository libmoo-perl.
commit 821cdd059215c8c8efa4af93a2bee4e3bf70a3c3
Author: Graham Knop <haarg at haarg.org>
Date: Thu Dec 1 20:46:54 2016 -0500
test Moo's create_class_with_roles, not Role::Tiny's
---
t/compose-roles.t | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/t/compose-roles.t b/t/compose-roles.t
index 5340a18..7a8dedf 100644
--- a/t/compose-roles.t
+++ b/t/compose-roles.t
@@ -3,13 +3,13 @@ use Test::More;
use Test::Fatal;
{
- package One; use Role::Tiny;
+ package One; use Moo::Role;
around foo => sub { my $orig = shift; (__PACKAGE__, $orig->(@_)) };
- package Two; use Role::Tiny;
+ package Two; use Moo::Role;
around foo => sub { my $orig = shift; (__PACKAGE__, $orig->(@_)) };
- package Three; use Role::Tiny;
+ package Three; use Moo::Role;
around foo => sub { my $orig = shift; (__PACKAGE__, $orig->(@_)) };
- package Four; use Role::Tiny;
+ package Four; use Moo::Role;
around foo => sub { my $orig = shift; (__PACKAGE__, $orig->(@_)) };
package Base; sub foo { __PACKAGE__ }
}
@@ -19,13 +19,13 @@ foreach my $combo (
[ qw(Two Four Three) ],
[ qw(One Two) ]
) {
- my $combined = Role::Tiny->create_class_with_roles('Base', @$combo);
+ my $combined = Moo::Role->create_class_with_roles('Base', @$combo);
is_deeply(
[ $combined->foo ], [ reverse(@$combo), 'Base' ],
"${combined} ok"
);
my $object = bless({}, 'Base');
- Role::Tiny->apply_roles_to_object($object, @$combo);
+ Moo::Role->apply_roles_to_object($object, @$combo);
is(ref($object), $combined, 'Object reblessed into correct class');
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libmoo-perl.git
More information about the Pkg-perl-cvs-commits
mailing list