DEATH TO ALL zionist ELLIPSES
[gitmo/Moose.git] / t / 010_basics / 009_import_unimport.t
index 7e58c7c..570f5cb 100644 (file)
@@ -3,66 +3,71 @@
 use strict;
 use warnings;
 
-use Test::More tests => 46;
-
+use Test::More tests => 41;
 
 
 my @moose_exports = qw(
-    extends with 
-    has 
+    extends with
+    has
     before after around
     override
     augment
     super inner
-    make_immutable
 );
 
 {
     package Foo;
-}
 
-eval q{
-    package Foo;
-    use Moose;
-};
-ok(!$@, '... Moose succesfully exported into Foo');
+    eval 'use Moose';
+    die $@ if $@;
+}
 
 can_ok('Foo', $_) for @moose_exports;
 
-eval q{
+{
     package Foo;
-    no Moose;
-};
-ok(!$@, '... Moose succesfully un-exported from Foo');
 
-ok(!Foo->can($_), '... Foo can no longer do ' . $_) for @moose_exports;
+    eval 'no Moose';
+    die $@ if $@;
+}
+
+ok(!Foo->can($_), 'Foo can no longer do ' . $_) for @moose_exports;
 
 # and check the type constraints as well
 
 my @moose_type_constraint_exports = qw(
-    type subtype as where message 
-    coerce from via 
+    type subtype as where message
+    coerce from via
     enum
     find_type_constraint
 );
 
 {
     package Bar;
-}
 
-eval q{
-    package Bar;
-    use Moose::Util::TypeConstraints;
-};
-ok(!$@, '... Moose::Util::TypeConstraints succesfully exported into Bar');
+    eval 'use Moose::Util::TypeConstraints';
+    die $@ if $@;
+}
 
 can_ok('Bar', $_) for @moose_type_constraint_exports;
 
-eval q{
+{
     package Bar;
-    no Moose::Util::TypeConstraints;
-};
-ok(!$@, '... Moose::Util::TypeConstraints succesfully un-exported from Bar');
 
-ok(!Bar->can($_), '... Bar can no longer do ' . $_) for @moose_type_constraint_exports;
+    eval 'no Moose::Util::TypeConstraints';
+    die $@ if $@;
+}
+
+ok(!Bar->can($_), 'Bar can no longer do ' . $_) for @moose_type_constraint_exports;
+
+
+{
+    package Baz;
+
+    use Scalar::Util qw( blessed );
+    use Moose;
+
+    no Moose;
+}
 
+can_ok( 'Baz', 'blessed' );