Cleanup failing tests
[gitmo/Mouse.git] / Moose-t-failing / 050_metaclasses / 010_extending_and_embedding_back_compat.t
diff --git a/Moose-t-failing/050_metaclasses/010_extending_and_embedding_back_compat.t b/Moose-t-failing/050_metaclasses/010_extending_and_embedding_back_compat.t
new file mode 100644 (file)
index 0000000..4a49b1a
--- /dev/null
@@ -0,0 +1,60 @@
+#!/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;
+$TODO = q{Mouse is not yet completed};
+use Test::Exception;
+
+
+BEGIN {
+    package MyFramework::Base;
+    use Mouse;
+
+    package MyFramework::Meta::Base;
+    use Mouse;
+
+    extends 'Mouse::Meta::Class';
+
+    package MyFramework;
+    use Mouse;
+    use Mouse::Deprecated -api_version => '0.55';
+
+    sub import {
+        my $CALLER = caller();
+
+        strict->import;
+        warnings->import;
+
+        return if $CALLER eq 'main';
+        Mouse::init_meta( $CALLER, 'MyFramework::Base', 'MyFramework::Meta::Base' );
+        Mouse->import({ into => $CALLER });
+
+        return 1;
+    }
+}
+
+{
+    package MyClass;
+    BEGIN { MyFramework->import }
+
+    has 'foo' => (is => 'rw');
+}
+
+can_ok( 'MyClass', 'meta' );
+
+isa_ok(MyClass->meta, 'MyFramework::Meta::Base');
+isa_ok(MyClass->meta, 'Mouse::Meta::Class');
+
+my $obj = MyClass->new(foo => 10);
+isa_ok($obj, 'MyClass');
+isa_ok($obj, 'MyFramework::Base');
+isa_ok($obj, 'Mouse::Object');
+
+is($obj->foo, 10, '... got the right value');
+
+done_testing;