use strict;
use warnings;
-use Test::More tests => 41;
+use lib 't/lib';
+
+use Test::More;
use Test::Exception;
+use MetaTest;
+
+skip_all_meta 41;
=pod
NOTE:
use strict;
use warnings;
-use Test::More tests => 86;
+use lib 't/lib';
+
+use Test::More;
use Test::Exception;
+use MetaTest;
+
+skip_all_meta 86;
+
{
package FooRole;
use Moose::Role;
use strict;
use warnings;
+use lib 't/lib';
+
use Test::More tests => 14;
use Test::Exception;
+use MetaTest;
{
requires 'foo';
}
-
-is_deeply(
- [ sort Foo::Role->meta->get_required_method_list ],
- ['foo'],
- '... the Foo::Role has a required method (foo)'
-);
+skip_meta {
+ is_deeply(
+ [ sort Foo::Role->meta->get_required_method_list ],
+ ['foo'],
+ '... the Foo::Role has a required method (foo)'
+ );
+} 1;
# classes which does not implement required method
{
sub foo {'Bar::Role::foo'}
}
-
-is_deeply(
- [ sort Bar::Role->meta->get_required_method_list ],
- [],
- '... the Bar::Role has not inherited the required method from Foo::Role'
-);
+skip_meta {
+ is_deeply(
+ [ sort Bar::Role->meta->get_required_method_list ],
+ [],
+ '... the Bar::Role has not inherited the required method from Foo::Role'
+ );
+} 1;
# role which does not implement required method
{
::lives_ok { with('Foo::Role') }
'... no foo method implemented by Baz::Role';
}
-
-is_deeply(
- [ sort Baz::Role->meta->get_required_method_list ],
- ['foo'],
- '... the Baz::Role has inherited the required method from Foo::Role'
-);
+skip_meta {
+ is_deeply(
+ [ sort Baz::Role->meta->get_required_method_list ],
+ ['foo'],
+ '... the Baz::Role has inherited the required method from Foo::Role'
+ );
+} 1;
# classes which does not implement required method
{
use strict;
use warnings;
+use lib 't/lib';
+
use Test::More tests => 88;
use Test::Exception;
+use MetaTest;
+
=pod
Mutually recursive roles.
is($test2->bar, 'Role::Foo::bar', '... $test2->bar worked');
# check some meta-stuff
+skip_meta {
+ ok(Role::Foo->meta->has_method('bar'), '... it still has the bar method');
+ ok(Role::Foo->meta->requires_method('foo'), '... it still has the required foo method');
-ok(Role::Foo->meta->has_method('bar'), '... it still has the bar method');
-ok(Role::Foo->meta->requires_method('foo'), '... it still has the required foo method');
-
-ok(Role::Bar->meta->has_method('foo'), '... it still has the foo method');
-ok(Role::Bar->meta->requires_method('bar'), '... it still has the required bar method');
-
+ ok(Role::Bar->meta->has_method('foo'), '... it still has the foo method');
+ ok(Role::Bar->meta->requires_method('bar'), '... it still has the required bar method');
+} 4;
=pod
Role method conflicts
sub bling { 'My::Test6::bling' }
}
-ok(!My::Test3->meta->has_method('bling'), '... we didnt get any methods in the conflict');
-ok(My::Test4->meta->has_method('bling'), '... we did get the method when manually dealt with');
-ok(My::Test5->meta->has_method('bling'), '... we did get the method when manually dealt with');
-ok(My::Test6->meta->has_method('bling'), '... we did get the method when manually dealt with');
+skip_meta {
+ ok(!My::Test3->meta->has_method('bling'), '... we didnt get any methods in the conflict');
+ ok(My::Test4->meta->has_method('bling'), '... we did get the method when manually dealt with');
+ ok(My::Test5->meta->has_method('bling'), '... we did get the method when manually dealt with');
+ ok(My::Test6->meta->has_method('bling'), '... we did get the method when manually dealt with');
+} 4;
ok(!My::Test3->does('Role::Bling'), '... our class does() the correct roles');
ok(!My::Test3->does('Role::Bling::Bling'), '... our class does() the correct roles');
sub bling { 'Role::Bling::Bling::Bling::bling' }
}
-
-ok(Role::Bling::Bling->meta->has_method('bling'), '... still got the bling method in Role::Bling::Bling');
-ok(Role::Bling::Bling->meta->does_role('Role::Bling::Bling'), '... our role correctly does() the other role');
-ok(Role::Bling::Bling::Bling->meta->has_method('bling'), '... dont have the bling method in Role::Bling::Bling::Bling');
-is(Role::Bling::Bling::Bling->meta->get_method('bling')->(),
- 'Role::Bling::Bling::Bling::bling',
- '... still got the bling method in Role::Bling::Bling::Bling');
+skip_meta {
+ ok(Role::Bling::Bling->meta->has_method('bling'), '... still got the bling method in Role::Bling::Bling');
+ ok(Role::Bling::Bling->meta->does_role('Role::Bling::Bling'), '... our role correctly does() the other role');
+ ok(Role::Bling::Bling::Bling->meta->has_method('bling'), '... dont have the bling method in Role::Bling::Bling::Bling');
+ is(Role::Bling::Bling::Bling->meta->get_method('bling')->(),
+ 'Role::Bling::Bling::Bling::bling',
+ '... still got the bling method in Role::Bling::Bling::Bling');
+} 4;
=pod
}
-ok(!My::Test7->meta->has_attribute('ghost'), '... we didnt get any attributes in the conflict');
-ok(My::Test8->meta->has_attribute('ghost'), '... we did get an attributes when manually composed');
-ok(My::Test9->meta->has_attribute('ghost'), '... we did get an attributes when manually composed');
-ok(My::Test10->meta->has_attribute('ghost'), '... we did still have an attribute ghost (conflict does not mess with class)');
-
+skip_meta {
+ ok(!My::Test7->meta->has_attribute('ghost'), '... we didnt get any attributes in the conflict');
+ ok(My::Test8->meta->has_attribute('ghost'), '... we did get an attributes when manually composed');
+ ok(My::Test9->meta->has_attribute('ghost'), '... we did get an attributes when manually composed');
+ ok(My::Test10->meta->has_attribute('ghost'), '... we did still have an attribute ghost (conflict does not mess with class)');
+} 4;
ok(!My::Test7->does('Role::Boo'), '... our class does() the correct roles');
ok(!My::Test7->does('Role::Boo::Hoo'), '... our class does() the correct roles');
ok(My::Test8->does('Role::Boo'), '... our class does() the correct roles');
} qr/Two \'override\' methods of the same name encountered/,
'... cannot compose it because we have no superclass';
}
-
-ok(My::Test11->meta->has_method('twist'), '... the twist method has been added');
-ok(My::Test12->meta->has_method('twist'), '... the twist method has been added');
-ok(!My::Test13->meta->has_method('twist'), '... the twist method has not been added');
-ok(!My::Test14->meta->has_method('twist'), '... the twist method has not been added');
+skip_meta {
+ ok(My::Test11->meta->has_method('twist'), '... the twist method has been added');
+ ok(My::Test12->meta->has_method('twist'), '... the twist method has been added');
+ ok(!My::Test13->meta->has_method('twist'), '... the twist method has not been added');
+ ok(!My::Test14->meta->has_method('twist'), '... the twist method has not been added');
+} 4;
ok(!My::Test11->does('Role::Plot'), '... our class does() the correct roles');
ok(My::Test11->does('Role::Truth'), '... our class does() the correct roles');
}
}
-ok(Role::Reality->meta->has_method('twist'), '... the twist method has not been added');
-#ok(!Role::Reality->meta->does_role('Role::Plot'), '... our role does() the correct roles');
-is(Role::Reality->meta->get_method('twist')->(),
- 'Role::Reality::twist',
- '... the twist method returns the right value');
+skip_meta {
+ ok(Role::Reality->meta->has_method('twist'), '... the twist method has not been added');
+ #ok(!Role::Reality->meta->does_role('Role::Plot'), '... our role does() the correct roles');
+ is(Role::Reality->meta->get_method('twist')->(),
+ 'Role::Reality::twist',
+ '... the twist method returns the right value');
+} 2;
# Ovid's test case from rt.cpan.org #44
{
use strict;
use warnings;
-use Test::More tests => 22;
+use lib 't/lib';
+
+use Test::More;
use Test::Exception;
+use MetaTest;
+
+skip_all_meta 22;
+
=pod
The idea and examples for this feature are taken
use strict;
use warnings;
+use lib 't/lib';
+
use Test::More tests => 15;
use Test::Exception;
+use MetaTest;
+
=pod
NOTE:
override 'foo' => sub { 'Role::ProvideFoo::foo' };
}
-is_deeply(
- [ Role::ProvideFoo->meta->get_required_method_list ],
- [ 'foo' ],
- '... foo method is still required for Role::ProvideFoo');
+skip_meta {
+ is_deeply(
+ [ Role::ProvideFoo->meta->get_required_method_list ],
+ [ 'foo' ],
+ '... foo method is still required for Role::ProvideFoo');
+} 1;
=pod
use Moose;
extends 'Class::ProvideFoo::Base';
-
+ use MetaTest;
sub foo { 'Class::ProvideFoo::foo' }
before 'foo' => sub { 'Class::ProvideFoo::foo:before' };
-
- ::isa_ok(__PACKAGE__->meta->get_method('foo'), 'Class::MOP::Method::Wrapped');
- ::is(__PACKAGE__->meta->get_method('foo')->get_original_method->package_name, __PACKAGE__,
- '... but the original method is from our package');
+ skip_meta {
+ ::isa_ok(__PACKAGE__->meta->get_method('foo'), 'Class::MOP::Method::Wrapped');
+ ::is(__PACKAGE__->meta->get_method('foo')->get_original_method->package_name, __PACKAGE__,
+ '... but the original method is from our package');
+ } 2;
::lives_ok {
with 'Role::RequireFoo';
use strict;
use warnings;
-use Test::More tests => 32;
+use lib 't/lib';
+
+use Test::More;
use Test::Exception;
+use MetaTest;
+
+skip_all_meta 32;
+
=pod
Check for repeated inheritance causing
use strict;
use warnings;
+use lib 't/lib';
+
use Test::More tests => 74;
use Test::Exception;
+use MetaTest;
{
lives_ok { $i->foo } '... called foo successfully (again)';
is( $i->counter, 2, "after hook called (again)" );
-
- ok(SubBA->meta->has_method('foo'), '... this has the foo method');
+ skip_meta {
+ ok(SubBA->meta->has_method('foo'), '... this has the foo method');
+ } 1;
#my $subba_foo_rv;
#lives_ok {
# $subba_foo_rv = SubBA::foo();
use strict;
use warnings;
-use Test::More tests => 27;
+use lib 't/lib';
+
+use Test::More;
use Scalar::Util qw(blessed);
+use MetaTest;
+
+skip_all_meta 27;
=pod
use strict;
use warnings;
+use lib 't/lib';
+
use Test::More tests => 39;
use Test::Exception;
+use MetaTest;
{
sub bar { 'Class::A::Resolved::bar' }
}
-ok(Role::A::Conflict->meta->requires_method('bar'), '... Role::A::Conflict created the bar requirement');
+skip_meta {
+ ok(Role::A::Conflict->meta->requires_method('bar'), '... Role::A::Conflict created the bar requirement');
+} 1;
can_ok( Class::A::Resolved->new, qw(bar) );
is( Class::B->new->bar, "Role::D::bar", "... got the &bar method okay" );
is( Class::B->new->xxy, "Role::E::xxy", "... got the &xxy method okay" );
-ok(!Role::F->meta->requires_method('foo'), '... Role::F fufilled the &foo requirement');
+skip_meta {
+ ok(!Role::F->meta->requires_method('foo'), '... Role::F fufilled the &foo requirement');
+} 1;
{
# check that a conflict can be resolved
}
-ok(!Role::D::And::E::Conflict->meta->requires_method('foo'), '... Role::D::And::E::Conflict fufilled the &foo requirement');
-ok(Role::D::And::E::Conflict->meta->requires_method('xxy'), '... Role::D::And::E::Conflict adds the &xxy requirement');
-ok(Role::D::And::E::Conflict->meta->requires_method('bar'), '... Role::D::And::E::Conflict adds the &bar requirement');
+skip_meta {
+ ok(!Role::D::And::E::Conflict->meta->requires_method('foo'), '... Role::D::And::E::Conflict fufilled the &foo requirement');
+ ok(Role::D::And::E::Conflict->meta->requires_method('xxy'), '... Role::D::And::E::Conflict adds the &xxy requirement');
+ ok(Role::D::And::E::Conflict->meta->requires_method('bar'), '... Role::D::And::E::Conflict adds the &bar requirement');
+} 3;
{
# conflict propagation
is( Class::E->new->bar, "Role::H::bar", "... got the right &bar method" );
is( Class::E->new->xxy, "Role::J::xxy", "... got the right &xxy method" );
-ok(Role::I->meta->requires_method('foo'), '... Role::I still have the &foo requirement');
+skip_meta {
+ ok(Role::I->meta->requires_method('foo'), '... Role::I still have the &foo requirement');
+} 1;
{
lives_ok {
use strict;
use warnings;
+use lib 't/lib';
+
use Test::More tests => 19;
use Test::Exception;
+use MetaTest;
{
with 'My::Role' => { -excludes => 'bar' };
}
-ok(My::Class->meta->has_method($_), "we have a $_ method") for qw(foo baz);
-ok(!My::Class->meta->has_method('bar'), '... but we excluded bar');
+skip_meta {
+ ok(My::Class->meta->has_method($_), "we have a $_ method") for qw(foo baz);
+ ok(!My::Class->meta->has_method('bar'), '... but we excluded bar');
+} 3;
{
package My::OtherRole;
sub bar { 'My::OtherRole::bar' }
}
-ok(My::OtherRole->meta->has_method($_), "we have a $_ method") for qw(foo bar baz);
+skip_meta {
+ ok(My::OtherRole->meta->has_method($_), "we have a $_ method") for qw(foo bar baz);
-ok(!My::OtherRole->meta->requires_method('foo'), '... and the &foo method is not required');
-ok(My::OtherRole->meta->requires_method('bar'), '... and the &bar method is required');
+ ok(!My::OtherRole->meta->requires_method('foo'), '... and the &foo method is not required');
+ ok(My::OtherRole->meta->requires_method('bar'), '... and the &bar method is required');
+} 5;
{
package Foo::Role;
} '... composed our roles correctly';
}
-ok(My::Foo::Role->meta->has_method('foo'), "we have a foo method");
-ok(!My::Foo::Role->meta->requires_method('foo'), '... and the &foo method is not required');
+skip_meta {
+ ok(My::Foo::Role->meta->has_method('foo'), "we have a foo method");
+ ok(!My::Foo::Role->meta->requires_method('foo'), '... and the &foo method is not required');
+} 2;
{
package My::Foo::Role::Other;
} '... composed our roles correctly';
}
-ok(!My::Foo::Role::Other->meta->has_method('foo'), "we dont have a foo method");
-ok(My::Foo::Role::Other->meta->requires_method('foo'), '... and the &foo method is required');
+skip_meta {
+ ok(!My::Foo::Role::Other->meta->has_method('foo'), "we dont have a foo method");
+ ok(My::Foo::Role::Other->meta->requires_method('foo'), '... and the &foo method is required');
+} 2;
use strict;
use warnings;
+use lib 't/lib';
+
use Test::More tests => 35;
use Test::Exception;
+use MetaTest;
{
sub role_bar { 'FAIL' }
}
-ok(My::Class->meta->has_method($_), "we have a $_ method") for qw(foo baz bar role_bar);
+skip_meta {
+ ok(My::Class->meta->has_method($_), "we have a $_ method") for qw(foo baz bar role_bar);
+} 4;
{
package My::OtherRole;
sub role_bar { 'FAIL' }
}
-ok(My::OtherRole->meta->has_method($_), "we have a $_ method") for qw(foo baz role_bar);
-ok(!My::OtherRole->meta->requires_method('bar'), '... and the &bar method is not required');
-ok(!My::OtherRole->meta->requires_method('role_bar'), '... and the &role_bar method is not required');
+skip_meta {
+ ok(My::OtherRole->meta->has_method($_), "we have a $_ method") for qw(foo baz role_bar);
+ ok(!My::OtherRole->meta->requires_method('bar'), '... and the &bar method is not required');
+ ok(!My::OtherRole->meta->requires_method('role_bar'), '... and the &role_bar method is not required');
+} 5;
{
package My::AliasingRole;
} '... this succeeds';
}
-ok(My::AliasingRole->meta->has_method($_), "we have a $_ method") for qw(foo baz role_bar);
-ok(My::AliasingRole->meta->requires_method('bar'), '... and the &bar method is required');
+skip_meta {
+ ok(My::AliasingRole->meta->has_method($_), "we have a $_ method") for qw(foo baz role_bar);
+ ok(My::AliasingRole->meta->requires_method('bar'), '... and the &bar method is required');
+} 4;
{
package Foo::Role;
} '... composed our roles correctly';
}
-ok(My::Foo::Role->meta->has_method($_), "we have a $_ method") for qw/foo foo_foo bar_foo/;;
-ok(!My::Foo::Role->meta->requires_method('foo'), '... and the &foo method is not required');
+skip_meta {
+ ok(My::Foo::Role->meta->has_method($_), "we have a $_ method") for qw/foo foo_foo bar_foo/;;
+ ok(!My::Foo::Role->meta->requires_method('foo'), '... and the &foo method is not required');
+} 4;
{
'Baz::Role';
} '... composed our roles correctly';
}
-
-ok(!My::Foo::Role::Other->meta->has_method('foo_foo'), "we dont have a foo_foo method");
-ok(My::Foo::Role::Other->meta->requires_method('foo_foo'), '... and the &foo method is required');
+skip_meta {
+ ok(!My::Foo::Role::Other->meta->has_method('foo_foo'), "we dont have a foo_foo method");
+ ok(My::Foo::Role::Other->meta->requires_method('foo_foo'), '... and the &foo method is required');
+} 2;
use strict;
use warnings;
+use lib 't/lib';
+
use Test::More tests => 11;
use Test::Exception;
use Scalar::Util 'blessed';
+use MetaTest;
$obj->dog($obj)
} '... and setting the accessor fails (not a Dog yet)';
-Dog->meta->apply($obj);
+skip_meta {
+ Dog->meta->apply($obj);
-ok($obj->does('Dog'), '... we now do the Bark role');
-ok($obj->can('talk'), "... the role is now composed at the object level");
-ok($obj->can('fur'), "it has fur");
+ ok($obj->does('Dog'), '... we now do the Bark role');
+ ok($obj->can('talk'), "... the role is now composed at the object level");
+ ok($obj->can('fur'), "it has fur");
-is($obj->talk, 'woof', '... got the right return value for the newly composed method');
+ is($obj->talk, 'woof', '... got the right return value for the newly composed method');
-lives_ok {
- $obj->dog($obj)
-} '... and setting the accessor is okay';
+ lives_ok {
+ $obj->dog($obj)
+ } '... and setting the accessor is okay';
-is($obj->fur, "dirty", "role attr initialized");
+ is($obj->fur, "dirty", "role attr initialized");
+} 6;
use strict;
use warnings;
+use lib 't/lib';
+
use Test::More tests => 7;
use Test::Exception;
use Scalar::Util 'blessed';
+use MetaTest;
$foo->dog($bar)
} '... and setting the accessor fails (not a Dog yet)';
-Dog->meta->apply($bar);
-
-ok($bar->can('talk'), "... the role is now composed at the object level");
+skip_meta {
+ Dog->meta->apply($bar);
-is($bar->talk, 'woof', '... got the right return value for the newly composed method');
+ ok($bar->can('talk'), "... the role is now composed at the object level");
-lives_ok {
- $foo->dog($bar)
-} '... and setting the accessor is okay';
+ is($bar->talk, 'woof', '... got the right return value for the newly composed method');
+ lives_ok {
+ $foo->dog($bar)
+ } '... and setting the accessor is okay';
+} 3;
use strict;
use warnings;
+use lib 't/lib';
+
use Test::More tests => 21;
use Test::Exception;
+use MetaTest;
{
is($foo->bar, 'BAR', '... got the expect value');
ok(!$foo->can('baz'), '... no baz method though');
- lives_ok {
- Bar->meta->apply($foo)
- } '... this works';
+ skip_meta {
+ lives_ok {
+ Bar->meta->apply($foo)
+ } '... this works';
- is($foo->bar, 'BAR', '... got the expect value');
- ok($foo->can('baz'), '... we have baz method now');
- is($foo->baz, 'BAZ', '... got the expect value');
+ is($foo->bar, 'BAR', '... got the expect value');
+ ok($foo->can('baz'), '... we have baz method now');
+ is($foo->baz, 'BAZ', '... got the expect value');
+ } 4;
}
# with extra params ...
is($foo->bar, 'BAR', '... got the expect value');
ok(!$foo->can('baz'), '... no baz method though');
- lives_ok {
- Bar->meta->apply($foo, (rebless_params => { baz => 'FOO-BAZ' }))
- } '... this works';
+ skip_meta {
+ lives_ok {
+ Bar->meta->apply($foo, (rebless_params => { baz => 'FOO-BAZ' }))
+ } '... this works';
- is($foo->bar, 'BAR', '... got the expect value');
- ok($foo->can('baz'), '... we have baz method now');
- is($foo->baz, 'FOO-BAZ', '... got the expect value');
+ is($foo->bar, 'BAR', '... got the expect value');
+ ok($foo->can('baz'), '... we have baz method now');
+ is($foo->baz, 'FOO-BAZ', '... got the expect value');
+ } 4;
}
# with extra params ...
is($foo->bar, 'BAR', '... got the expect value');
ok(!$foo->can('baz'), '... no baz method though');
- lives_ok {
- Bar->meta->apply($foo, (rebless_params => { bar => 'FOO-BAR', baz => 'FOO-BAZ' }))
- } '... this works';
+ skip_meta {
+ lives_ok {
+ Bar->meta->apply($foo, (rebless_params => { bar => 'FOO-BAR', baz => 'FOO-BAZ' }))
+ } '... this works';
- is($foo->bar, 'FOO-BAR', '... got the expect value');
- ok($foo->can('baz'), '... we have baz method now');
- is($foo->baz, 'FOO-BAZ', '... got the expect value');
+ is($foo->bar, 'FOO-BAR', '... got the expect value');
+ ok($foo->can('baz'), '... we have baz method now');
+ is($foo->baz, 'FOO-BAZ', '... got the expect value');
+ } 4;
}
#!/usr/bin/env perl
use strict;
use warnings;
+
+use lib 't/lib';
+
use Test::More;
+
BEGIN {
eval "use Test::Output;";
plan skip_all => "Test::Output is required for this test" if $@;
plan tests => 8;
}
+use MetaTest;
+
# this test script ensures that my idiom of:
# role: sub BUILD, after BUILD
# continues to work to run code after object initialization, whether the class
with 'TestRole';
};
-{
+skip_meta {
+ {
is_deeply([splice @CALLS], [], "no calls to BUILD yet");
ClassWithBUILD->new;
ClassWithoutBUILD->meta->make_immutable;
redo;
}
-}
+ }
+} 3*2;
use strict;
use warnings;
-use Test::More tests => 14;
+use lib 't/lib';
+
+use Test::More;
use Test::Exception;
use Moose::Meta::Role::Application::RoleSummation;
use Moose::Meta::Role::Composite;
+use MetaTest;
+
+skip_all_meta 14;
+
{
package Role::Foo;
use Moose::Role;
use strict;
use warnings;
-use Test::More tests => 12;
+use lib 't/lib';
+
+use Test::More;
use Test::Exception;
use Moose::Meta::Role::Application::RoleSummation;
use Moose::Meta::Role::Composite;
+use MetaTest;
+
+skip_all_meta 12;
+
{
package Role::Foo;
use Moose::Role;
use strict;
use warnings;
-use Test::More tests => 16;
+use lib 't/lib';
+
+use Test::More;
use Test::Exception;
use Moose::Meta::Role::Application::RoleSummation;
use Moose::Meta::Role::Composite;
+use MetaTest;
+
+skip_all_meta 16;
+
{
package Role::Foo;
use Moose::Role;
use strict;
use warnings;
-use Test::More tests => 7;
+use lib 't/lib';
+
+use Test::More;
use Test::Exception;
use Moose::Meta::Role::Application::RoleSummation;
use Moose::Meta::Role::Composite;
+use MetaTest;
+
+skip_all_meta 7;
+
{
package Role::Foo;
use Moose::Role;
use strict;
use warnings;
-use Test::More tests => 19;
+use lib 't/lib';
+
+use Test::More;
use Test::Exception;
use Moose::Meta::Role::Application::RoleSummation;
use Moose::Meta::Role::Composite;
+use MetaTest;
+
+skip_all_meta 19;
+
+
{
package Role::Foo;
use Moose::Role;
use strict;
use warnings;
-use Test::More tests => 8;
+use lib 't/lib';
+
+use Test::More;
use Test::Exception;
use Moose::Meta::Role::Application::RoleSummation;
use Moose::Meta::Role::Composite;
+use MetaTest;
+
+skip_all_meta 8;
+
{
package Role::Foo;
use Moose::Role;
use strict;
use warnings;
-use Test::More tests => 7;
+use lib 't/lib';
+
+use Test::More;
use Test::Exception;
use Moose::Meta::Role::Application::RoleSummation;
use Moose::Meta::Role::Composite;
+use MetaTest;
+
+skip_all_meta 7;
+
{
package Role::Foo;
use Moose::Role;
use strict;
use warnings;
-use Test::More tests => 1;
+use Test::More;
use Test::Exception;
use Moose::Meta::Class;
use Moose::Util;
use lib 't/lib', 'lib';
+use MetaTest;
+
+skip_all_meta 1;
# Note that this test passed (pre svn #5543) if we inlined the role
# definitions in this file, as it was very timing sensitive.
use strict;
use warnings;
+use lib 't/lib';
+
use Test::More tests => 17;
+use MetaTest;
{
package Role::Foo;
with 'Role::Foo';
}
-{
+skip_meta {
my $meth = ClassA->meta->get_method('foo');
ok( $meth, 'ClassA has a foo method' );
isa_ok( $meth, 'Moose::Meta::Method' );
'fq name is ClassA::foo' );
is( $meth->original_fully_qualified_name, 'Role::Foo::foo',
'original fq name is Role::Foo::foo' );
-}
+} 5;
{
package Role::Bar;
sub bar { }
}
-{
+skip_meta {
my $meth = Role::Bar->meta->get_method('foo');
ok( $meth, 'Role::Bar has a foo method' );
is( $meth->original_method, Role::Foo->meta->get_method('foo'),
'fq name is Role::Bar::foo' );
is( $meth->original_fully_qualified_name, 'Role::Foo::foo',
'original fq name is Role::Foo::foo' );
-}
+} 4;
{
package ClassB;
with 'Role::Bar';
}
-{
+skip_meta {
my $meth = ClassB->meta->get_method('foo');
ok( $meth, 'ClassB has a foo method' );
is( $meth->original_method, Role::Bar->meta->get_method('foo'),
'fq name is ClassA::foo' );
is( $meth->original_fully_qualified_name, 'Role::Foo::foo',
'original fq name is Role::Foo::foo' );
-}
+} 5;
isnt( ClassA->foo, "ClassB::foo", "ClassA::foo is not confused with ClassB::foo");
#!/usr/bin/env perl
use strict;
use warnings;
-use Test::More tests => 1;
+
+use lib 't/lib';
+
+use Test::More;
+
+use MetaTest;
+
+skip_all_meta 1;
do {
package My::Meta::Role;
#!/usr/bin/env perl
use strict;
use warnings;
-use Test::More tests => 24;
+
+use lib 't/lib';
+
+use Test::More;
+
+use MetaTest;
+
+skip_all_meta 24;
do {
package Role::Foo;
#!/usr/bin/env perl
use strict;
use warnings;
-use Test::More tests => 3;
+
+use lib 't/lib';
+
+use Test::More;
+
+use MetaTest;
+
+skip_all_meta 3;
my $OPTS;
do {
use strict;
use warnings;
-use Test::More tests => 6;
+use lib 't/lib';
+
+use Test::More;
+
+use MetaTest;
+
+skip_all_meta 6;
# test role and class
package SomeRole;