summaryrefslogtreecommitdiffstats
path: root/t
diff options
context:
space:
mode:
authordoy <doy@tozt.net>2009-04-11 18:04:49 -0500
committerdoy <doy@tozt.net>2009-04-11 18:04:49 -0500
commit83f7cd2cfadeffe711a275472975bbe247bea8af (patch)
tree1e8164214d8180a9a40c053c26d8575fd53f34b3 /t
parentab1a628d7a486f68cc63c42077213756962d4744 (diff)
downloadmoosex-nonmoose-83f7cd2cfadeffe711a275472975bbe247bea8af.tar.gz
moosex-nonmoose-83f7cd2cfadeffe711a275472975bbe247bea8af.zip
use has_method rather than get_method for testing for existence
Diffstat (limited to 't')
-rw-r--r--t/005-moose.t8
1 files changed, 4 insertions, 4 deletions
diff --git a/t/005-moose.t b/t/005-moose.t
index 86578cb..c6c6ac8 100644
--- a/t/005-moose.t
+++ b/t/005-moose.t
@@ -20,7 +20,7 @@ package main;
my $foo_sub = Foo::Sub->new;
isa_ok $foo_sub, 'Foo';
is $foo_sub->foo, 'FOO', 'inheritance works';
-is(Foo::Sub->meta->get_method('new'), undef,
+ok(!Foo::Sub->meta->has_method('new'),
'Foo::Sub doesn\'t have its own new method');
$_->meta->make_immutable for qw(Foo Foo::Sub);
@@ -28,7 +28,7 @@ $_->meta->make_immutable for qw(Foo Foo::Sub);
$foo_sub = Foo::Sub->new;
isa_ok $foo_sub, 'Foo';
is $foo_sub->foo, 'FOO', 'inheritance works (immutable)';
-is(Foo::Sub->meta->get_method('new'), undef,
+ok(!Foo::Sub->meta->has_method('new'),
'Foo::Sub doesn\'t have its own new method (immutable)');
package Foo::OtherSub;
@@ -40,7 +40,7 @@ package main;
my $foo_othersub = Foo::OtherSub->new;
isa_ok $foo_othersub, 'Foo';
is $foo_othersub->foo, 'FOO', 'inheritance works (immutable when extending)';
-ok(Foo::OtherSub->meta->get_method('new'),
+ok(Foo::OtherSub->meta->has_method('new'),
'Foo::OtherSub has its own inlined constructor (immutable when extending)');
ok(!(Foo::OtherSub->meta->get_method('new')->can('does_role')
&& Foo::OtherSub->meta->get_method('new')->does_role('MooseX::NonMoose::Meta::Role::Constructor')),
@@ -50,7 +50,7 @@ Foo::OtherSub->meta->make_immutable;
$foo_othersub = Foo::OtherSub->new;
isa_ok $foo_othersub, 'Foo';
is $foo_othersub->foo, 'FOO', 'inheritance works (all immutable)';
-ok(Foo::OtherSub->meta->get_method('new'),
+ok(Foo::OtherSub->meta->has_method('new'),
'Foo::OtherSub has its own inlined constructor (immutable when extending)');
ok(!(Foo::OtherSub->meta->get_method('new')->can('does_role')
&& Foo::OtherSub->meta->get_method('new')->does_role('MooseX::NonMoose::Meta::Role::Constructor')),