#!/usr/bin/env perl
use strict;
use warnings;
-use Test::More tests => 9;
+use Test::More;
use Test::Mouse;
my @called;
is_deeply([splice @called], [], "no BUILD calls yet");
-with_immutable {
+with_immutable sub {
my $object = Class->new;
ok defined($object), $object->meta->is_immutable() ? 'mutable' : 'immutable';
$child->BUILDALL({});
is_deeply([splice @called], ["Class::BUILD", "Child::BUILD"], 'BUILDALL');
-} qw(Class Child);
+ $child = Child->meta->new_object();
+ is_deeply([splice @called], ["Class::BUILD", "Child::BUILD"], 'new_object calls BUILDALL');
+}, qw(Class Child);
+
+done_testing;