Cleanup failing tests
[gitmo/Mouse.git] / Moose-t-failing / 050_metaclasses / 010_extending_and_embedding_back_compat.t
CommitLineData
41888e7d 1#!/usr/bin/perl
c47cf415 2# This is automatically generated by author/import-moose-test.pl.
3# DO NOT EDIT THIS FILE. ANY CHANGES WILL BE LOST!!!
4use t::lib::MooseCompat;
41888e7d 5
6use strict;
7use warnings;
8
c47cf415 9use Test::More;
10$TODO = q{Mouse is not yet completed};
41888e7d 11use Test::Exception;
12
13
41888e7d 14BEGIN {
15 package MyFramework::Base;
16 use Mouse;
17
18 package MyFramework::Meta::Base;
19 use Mouse;
20
21 extends 'Mouse::Meta::Class';
22
23 package MyFramework;
24 use Mouse;
c47cf415 25 use Mouse::Deprecated -api_version => '0.55';
41888e7d 26
27 sub import {
28 my $CALLER = caller();
29
30 strict->import;
31 warnings->import;
32
33 return if $CALLER eq 'main';
34 Mouse::init_meta( $CALLER, 'MyFramework::Base', 'MyFramework::Meta::Base' );
35 Mouse->import({ into => $CALLER });
36
37 return 1;
38 }
39}
40
41{
42 package MyClass;
43 BEGIN { MyFramework->import }
44
45 has 'foo' => (is => 'rw');
46}
47
48can_ok( 'MyClass', 'meta' );
49
50isa_ok(MyClass->meta, 'MyFramework::Meta::Base');
51isa_ok(MyClass->meta, 'Mouse::Meta::Class');
52
53my $obj = MyClass->new(foo => 10);
54isa_ok($obj, 'MyClass');
55isa_ok($obj, 'MyFramework::Base');
56isa_ok($obj, 'Mouse::Object');
57
58is($obj->foo, 10, '... got the right value');
59
c47cf415 60done_testing;