4 use Test::More 'no_plan';
10 # =begin testing SETUP
12 eval 'use Test::Output;';
14 diag 'Test::Output is required for this test';
22 # =begin testing SETUP
28 extends 'Mouse::Object';
30 before 'new' => sub { warn "Making a new " . $_[0] };
34 package MyApp::UseMyBase;
38 Mouse::Exporter->setup_import_methods( also => 'Mouse' );
42 return Mouse->init_meta( @_, base_class => 'MyApp::Base' );
53 MyApp::UseMyBase->import;
55 has( 'size' => ( is => 'rw' ) );
58 ok( Foo->isa('MyApp::Base'), 'Foo isa MyApp::Base' );
60 ok( Foo->can('size'), 'Foo has a size method' );
64 sub { $foo = Foo->new( size => 2 ) },
65 qr/^Making a new Foo/,
66 'got expected warning when calling Foo->new'
69 is( $foo->size(), 2, '$foo->size is 2' );