make CMOP::Class->construct_instance private
[gitmo/Class-MOP.git] / t / 072_immutable_w_constructors.t
index cc9c929..7ef79f0 100644 (file)
@@ -1,14 +1,10 @@
-#!/usr/bin/perl
-
 use strict;
 use warnings;
 
-use Test::More tests => 93;
+use Test::More tests => 91;
 use Test::Exception;
 
-BEGIN {
-    use_ok('Class::MOP');
-    use_ok('Class::MOP::Immutable');
+BEGIN {use Class::MOP;use Class::MOP::Immutable;
 }
 
 {
@@ -232,14 +228,14 @@ BEGIN {
     ok(!Baz->meta->has_method('new'), '... no constructor was made');
 
     {
-        my $baz = Baz->meta->construct_instance;
+        my $baz = Baz->meta->new_object;
         isa_ok($baz, 'Bar');
         is($baz->bar, 'BAR', '... got the right default value');
         is($baz->baz, 'BAZ', '... got the right default value');
     }
 
     {
-        my $baz = Baz->meta->construct_instance(bar => 'BAZ!', baz => 'BAR!', bah => 'BAH!');
+        my $baz = Baz->meta->new_object(bar => 'BAZ!', baz => 'BAR!', bah => 'BAH!');
         isa_ok($baz, 'Baz');
         is($baz->bar, 'BAZ!', '... got the right parameter value');
         is($baz->baz, 'BAR!', '... got the right parameter value');