From: Arthur Axel 'fREW' Schmidt Date: Sat, 5 Sep 2009 22:32:32 +0000 (-0500) Subject: skip meta tests for 060 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=65e81af92e2dfbd465df11439ed3185b315b10c6;p=gitmo%2FMoose.git skip meta tests for 060 --- diff --git a/t/060_compat/001_module_refresh_compat.t b/t/060_compat/001_module_refresh_compat.t index 93857cd..533eba7 100644 --- a/t/060_compat/001_module_refresh_compat.t +++ b/t/060_compat/001_module_refresh_compat.t @@ -8,6 +8,8 @@ use lib 't/lib', 'lib'; use Test::More; use Test::Exception; +use MetaTest; + BEGIN { eval "use Module::Refresh;"; plan skip_all => "Module::Refresh is required for this test" if $@; @@ -25,7 +27,9 @@ my @modules = qw[Foo Bar MyMooseA MyMooseB MyMooseObject]; do { use_ok($_); - is($_->meta->name, $_, '... initialized the meta correctly'); + skip_meta { + is($_->meta->name, $_, '... initialized the meta correctly'); + } 1; lives_ok { Module::Refresh->new->refresh_module($_ . '.pm') @@ -64,8 +68,10 @@ has 'foo' => (is => 'rw', isa => 'Int'); } use_ok('TestBaz'); -is(TestBaz->meta->name, 'TestBaz', '... initialized the meta correctly'); -ok(TestBaz->meta->has_attribute('foo'), '... it has the foo attribute as well'); +skip_meta { + is(TestBaz->meta->name, 'TestBaz', '... initialized the meta correctly'); + ok(TestBaz->meta->has_attribute('foo'), '... it has the foo attribute as well'); +} 2; ok(!TestBaz->isa('Foo'), '... TestBaz is not a Foo'); { @@ -79,8 +85,10 @@ lives_ok { Module::Refresh->new->refresh_module($test_module_file) } '... successfully refreshed ' . $test_module_file; -is(TestBaz->meta->name, 'TestBaz', '... initialized the meta correctly'); -ok(TestBaz->meta->has_attribute('foo'), '... it has the foo attribute as well'); +skip_meta { + is(TestBaz->meta->name, 'TestBaz', '... initialized the meta correctly'); + ok(TestBaz->meta->has_attribute('foo'), '... it has the foo attribute as well'); +} 2; ok(TestBaz->isa('Foo'), '... TestBaz is a Foo'); unlink $test_module_file; diff --git a/t/060_compat/002_moose_respects_base.t b/t/060_compat/002_moose_respects_base.t index 2e37c9d..b357316 100644 --- a/t/060_compat/002_moose_respects_base.t +++ b/t/060_compat/002_moose_respects_base.t @@ -3,9 +3,18 @@ use strict; use warnings; +use lib 't/lib'; + use Test::More tests => 6; use Test::Exception; +use MetaTest; + +# this is so that when we use base 'Foo' below we won't get the Foo.pm in t/lib +BEGIN { + @INC = grep { $_ ne 't/lib' } @INC; +}; + =pod @@ -37,10 +46,12 @@ this test also demonstrates. use base 'Foo'; } -my $bar = Bar->new; -isa_ok($bar, 'Bar'); -isa_ok($bar, 'Foo'); -ok(!$bar->isa('Moose::Object'), '... Bar is not Moose::Object subclass'); +skip_meta { + my $bar = Bar->new; + isa_ok($bar, 'Bar'); + isa_ok($bar, 'Foo'); + ok(!$bar->isa('Moose::Object'), '... Bar is not Moose::Object subclass'); +} 3; my $baz = Baz->new; isa_ok($baz, 'Baz'); diff --git a/t/060_compat/003_foreign_inheritence.t b/t/060_compat/003_foreign_inheritence.t index f99cac9..2a54fdc 100644 --- a/t/060_compat/003_foreign_inheritence.t +++ b/t/060_compat/003_foreign_inheritence.t @@ -3,9 +3,15 @@ use strict; use warnings; -use Test::More tests => 6; +use lib 't/lib'; + +use Test::More; use Test::Exception; +use MetaTest; + +skip_all_meta 6; + { diff --git a/t/060_compat/004_extends_nonmoose_that_isa_moose_with_metarole.t b/t/060_compat/004_extends_nonmoose_that_isa_moose_with_metarole.t index 19fe24e..47baa81 100644 --- a/t/060_compat/004_extends_nonmoose_that_isa_moose_with_metarole.t +++ b/t/060_compat/004_extends_nonmoose_that_isa_moose_with_metarole.t @@ -1,6 +1,14 @@ use strict; use warnings; -use Test::More tests => 18; + +use lib 't/lib'; + +use Test::More; + +use MetaTest; + +skip_all_meta 18; + use Class::MOP (); {