From: Dave Rolsky Date: Mon, 14 Feb 2011 03:32:21 +0000 (-0600) Subject: Skip this test entirely for now X-Git-Tag: v0.23~8 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo%2FMooseX-ClassAttribute.git;a=commitdiff_plain;h=e3e09e66d5c29ad6632a6e795390e411fa3c6712 Skip this test entirely for now --- diff --git a/t/12-moose-exporter.t b/t/12-moose-exporter.t new file mode 100644 index 0000000..07b2f16 --- /dev/null +++ b/t/12-moose-exporter.t @@ -0,0 +1,41 @@ +use strict; +use warnings; + +use Test::More; + +BEGIN { plan skip_all => 'This test fails with a syntax error' } + +{ + package MooseX::Foo; + + use strict; + use warnings; + + use Moose::Exporter; + use MooseX::ClassAttribute (); + + Moose::Exporter->setup_import_methods( + also => [ 'MooseX::ClassAttribute' ], + ); +} + +{ + package MyClass; + + use Moose; + # use MooseX::Foo; # normal use + MooseX::Foo->import; + + # Now theoretically, this should work -- the 'class_has' method + # should have been imported via the MooseX package above. + class_has attr => ( + is => 'ro', isa => 'Str', + default => 'foo', + ); +} + +my $obj = MyClass->new(); + +is( $obj->attr(), 'foo', 'class attribute is properly created' ); + +done_testing();