Hi
The following works as I expect:
package MyTest;
use Moose;
use Test::More;
BEGIN {
extends qw(Test::Class Moose::Object);
}
sub simple_test : Test {
is(1, 1, 'My tests run');
}
However, the following doesn't:
use MooseX::Declare;
class MyTest extends (Test::Class, Moose::Object) {
use Test::More;
method simple_test {
is (1, 1, 'My test runs');
}
};
Instead I get:
.. Not inlining 'new' for MyTest since it is not inheriting the default
Moose::Object::new
If you are certain you don't need to inline your constructor, specify
inline_constructor => 0 in your call to MyTest->meta->make_immutable
So how does one use Test::Class with MooseX::Declare? In addition, I'm not
clear how to use the "Test" attribute with the "method" specification since
method simple_test : Test
returns
Invalid CODE attribute: Test
Dan