Revert autogenerated tests. Tests should not changed radically.
[gitmo/Mouse.git] / t / 050_metaclasses / failing / 012_moose_exporter.t
similarity index 82%
rename from t/050_metaclasses/012_moose_exporter.t
rename to t/050_metaclasses/failing/012_moose_exporter.t
index 39ac3ef..63126aa 100644 (file)
@@ -1,17 +1,16 @@
 #!/usr/bin/perl
-# This is automatically generated by author/import-moose-test.pl.
-# DO NOT EDIT THIS FILE. ANY CHANGES WILL BE LOST!!!
-use t::lib::MooseCompat;
 
 use strict;
 use warnings;
 
 use Test::More;
 use Test::Exception;
+BEGIN {
+    eval "use Test::Output;";
+    plan skip_all => "Test::Output is required for this test" if $@;
+    plan tests => 65;
+}
 
-use Test::Requires {
-    'Test::Output' => '0.01', # skip all if not installed
-};
 
 {
     package HasOwnImmutable;
@@ -31,24 +30,24 @@ use Test::Requires {
 }
 
 {
-    package MooseX::Empty;
+    package MouseX::Empty;
 
     use Mouse ();
     Mouse::Exporter->setup_import_methods( also => 'Mouse' );
 }
 
 {
-    package WantsMoose;
+    package WantsMouse;
 
-    MooseX::Empty->import();
+    MouseX::Empty->import();
 
     sub foo { 1 }
 
-    ::can_ok( 'WantsMoose', 'has' );
-    ::can_ok( 'WantsMoose', 'with' );
-    ::can_ok( 'WantsMoose', 'foo' );
+    ::can_ok( 'WantsMouse', 'has' );
+    ::can_ok( 'WantsMouse', 'with' );
+    ::can_ok( 'WantsMouse', 'foo' );
 
-    MooseX::Empty->unimport();
+    MouseX::Empty->unimport();
 }
 
 {
@@ -57,18 +56,18 @@ use Test::Requires {
     # namespace::clean(0.08)-based solution, but had to abandon it
     # because it cleans the namespace _later_ (when the file scope
     # ends).
-    ok( ! WantsMoose->can('has'),  'WantsMoose::has() has been cleaned' );
-    ok( ! WantsMoose->can('with'), 'WantsMoose::with() has been cleaned' );
-    can_ok( 'WantsMoose', 'foo' );
+    ok( ! WantsMouse->can('has'),  'WantsMouse::has() has been cleaned' );
+    ok( ! WantsMouse->can('with'), 'WantsMouse::with() has been cleaned' );
+    can_ok( 'WantsMouse', 'foo' );
 
     # This makes sure that Mouse->init_meta() happens properly
-    isa_ok( WantsMoose->meta(), 'Mouse::Meta::Class' );
-    isa_ok( WantsMoose->new(), 'Mouse::Object' );
+    isa_ok( WantsMouse->meta(), 'Mouse::Meta::Class' );
+    isa_ok( WantsMouse->new(), 'Mouse::Object' );
 
 }
 
 {
-    package MooseX::Sugar;
+    package MouseX::Sugar;
 
     use Mouse ();
 
@@ -86,7 +85,7 @@ use Test::Requires {
 {
     package WantsSugar;
 
-    MooseX::Sugar->import();
+    MouseX::Sugar->import();
 
     sub foo { 1 }
 
@@ -97,7 +96,7 @@ use Test::Requires {
     ::is( wrapped1(), 'WantsSugar called wrapped1',
           'wrapped1 identifies the caller correctly' );
 
-    MooseX::Sugar->unimport();
+    MouseX::Sugar->unimport();
 }
 
 {
@@ -108,12 +107,12 @@ use Test::Requires {
 }
 
 {
-    package MooseX::MoreSugar;
+    package MouseX::MoreSugar;
 
     use Mouse ();
 
     sub wrapped2 {
-        my $caller = shift->name;
+        my $caller = shift;
         return $caller . ' called wrapped2';
     }
 
@@ -122,16 +121,16 @@ use Test::Requires {
     }
 
     Mouse::Exporter->setup_import_methods(
-        with_meta => ['wrapped2'],
-        as_is     => ['as_is1'],
-        also      => 'MooseX::Sugar',
+        with_caller => ['wrapped2'],
+        as_is       => ['as_is1'],
+        also        => 'MouseX::Sugar',
     );
 }
 
 {
     package WantsMoreSugar;
 
-    MooseX::MoreSugar->import();
+    MouseX::MoreSugar->import();
 
     sub foo { 1 }
 
@@ -148,7 +147,7 @@ use Test::Requires {
     ::is( as_is1(), 'as_is1',
           'as_is1 works as expected' );
 
-    MooseX::MoreSugar->unimport();
+    MouseX::MoreSugar->unimport();
 }
 
 {
@@ -196,14 +195,14 @@ use Test::Requires {
 }
 
 {
-    package MooseX::CircularAlso;
+    package MouseX::CircularAlso;
 
     use Mouse ();
 
     ::dies_ok(
         sub {
             Mouse::Exporter->setup_import_methods(
-                also => [ 'Mouse', 'MooseX::CircularAlso' ],
+                also => [ 'Mouse', 'MouseX::CircularAlso' ],
             );
         },
         'a circular reference in also dies with an error'
@@ -211,13 +210,13 @@ use Test::Requires {
 
     ::like(
         $@,
-        qr/\QCircular reference in 'also' parameter to Mouse::Exporter between MooseX::CircularAlso and MooseX::CircularAlso/,
+        qr/\QCircular reference in 'also' parameter to Mouse::Exporter between MouseX::CircularAlso and MouseX::CircularAlso/,
         'got the expected error from circular reference in also'
     );
 }
 
 {
-    package MooseX::NoAlso;
+    package MouseX::NoAlso;
 
     use Mouse ();
 
@@ -238,7 +237,7 @@ use Test::Requires {
 }
 
 {
-    package MooseX::NotExporter;
+    package MouseX::NotExporter;
 
     use Mouse ();
 
@@ -259,32 +258,32 @@ use Test::Requires {
 }
 
 {
-    package MooseX::OverridingSugar;
+    package MouseX::OverridingSugar;
 
     use Mouse ();
 
     sub has {
-        my $caller = shift->name;
+        my $caller = shift;
         return $caller . ' called has';
     }
 
     Mouse::Exporter->setup_import_methods(
-        with_meta => ['has'],
-        also      => 'Mouse',
+        with_caller => ['has'],
+        also        => 'Mouse',
     );
 }
 
 {
     package WantsOverridingSugar;
 
-    MooseX::OverridingSugar->import();
+    MouseX::OverridingSugar->import();
 
     ::can_ok( 'WantsOverridingSugar', 'has' );
     ::can_ok( 'WantsOverridingSugar', 'with' );
     ::is( has('foo'), 'WantsOverridingSugar called has',
-          'has from MooseX::OverridingSugar is called, not has from Mouse' );
+          'has from MouseX::OverridingSugar is called, not has from Mouse' );
 
-    MooseX::OverridingSugar->unimport();
+    MouseX::OverridingSugar->unimport();
 }
 
 {
@@ -300,7 +299,7 @@ use Test::Requires {
     ::stderr_like {
         Mouse::Exporter->setup_import_methods(
             also => ['Mouse'],
-            with_meta => ['does_not_exist'],
+            with_caller => ['does_not_exist'],
         );
     } qr/^Trying to export undefined sub NonExistentExport::does_not_exist/,
       "warns when a non-existent method is requested to be exported";
@@ -318,7 +317,6 @@ use Test::Requires {
 {
     package AllOptions;
     use Mouse ();
-    use Mouse::Deprecated -api_version => '0.88';
     use Mouse::Exporter;
 
     Mouse::Exporter->setup_import_methods(
@@ -391,5 +389,3 @@ use Test::Requires {
     ok( ! UseAllOptions->can($_), "UseAllOptions::$_ has been unimported" )
         for qw( with_meta1 with_meta2 with_caller1 with_caller2 as_is1 );
 }
-
-done_testing;