summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--t/11-multiple-instantiation.t3
-rw-r--r--t/22-more-inheritance.t3
-rw-r--r--t/35-no-service.t3
3 files changed, 9 insertions, 0 deletions
diff --git a/t/11-multiple-instantiation.t b/t/11-multiple-instantiation.t
index 7c5d8a2..c8372c1 100644
--- a/t/11-multiple-instantiation.t
+++ b/t/11-multiple-instantiation.t
@@ -2,6 +2,7 @@
use strict;
use warnings;
use Test::More;
+use Test::Moose;
{
package Bar;
@@ -32,9 +33,11 @@ use Test::More;
);
}
+with_immutable {
my $foo1 = Foo->new;
is($foo1->bar->foo, 'FOO');
my $foo2 = Foo->new(foo => 'BAR');
is($foo2->bar->foo, 'BAR');
+} 'Foo';
done_testing;
diff --git a/t/22-more-inheritance.t b/t/22-more-inheritance.t
index d13639b..94d726c 100644
--- a/t/22-more-inheritance.t
+++ b/t/22-more-inheritance.t
@@ -2,6 +2,7 @@
use strict;
use warnings;
use Test::More;
+use Test::Moose;
{
package Parent;
@@ -75,6 +76,7 @@ use Test::More;
);
}
+with_immutable {
{
my $obj = Parent->new;
is($obj->foo, 'parent');
@@ -98,5 +100,6 @@ use Test::More;
is($obj->foo, 'child');
is($obj->bar, 'child child');
}
+} 'Parent', 'Child1', 'Child2', 'Child3';
done_testing;
diff --git a/t/35-no-service.t b/t/35-no-service.t
index c6a9226..aeb4c48 100644
--- a/t/35-no-service.t
+++ b/t/35-no-service.t
@@ -3,6 +3,7 @@ use strict;
use warnings;
use Test::More;
use Test::Fatal;
+use Test::Moose;
{
package Bar;
@@ -40,6 +41,7 @@ use Test::Fatal;
);
}
+with_immutable {
{
my $foo = Foo->new;
ok($foo->has_service($_), "has service $_") for qw(foo baz);
@@ -68,5 +70,6 @@ use Test::Fatal;
"can't depend on attrs with no service"
);
}
+} 'Foo';
done_testing;