X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F400-define-role.t;h=7067651853bbb9e90c6bef3981da7d672de46d79;hb=c9313657717f78bd96f0325c6aa1c93d0b0d41a5;hp=5f130cc61cf7e84fe648ad041aabe89e70da88b5;hpb=b1b8155380073bc8170b50b17893474865604300;p=gitmo%2FMouse.git diff --git a/t/400-define-role.t b/t/400-define-role.t index 5f130cc..7067651 100644 --- a/t/400-define-role.t +++ b/t/400-define-role.t @@ -2,7 +2,7 @@ use strict; use warnings; use Test::More tests => 11; -use Mouse::Util ':test'; +use Test::Exception; lives_ok { package Role; @@ -44,7 +44,7 @@ lives_ok { package Role; use Mouse::Role; - has 'foo'; + has 'foo' => (is => 'bare'); no Mouse::Role; }; @@ -64,14 +64,19 @@ lives_ok { no Mouse::Role; }; -throws_ok { +TODO: { package Role; use Mouse::Role; - excludes 'excluded'; + eval { + excludes 'excluded'; + }; + our $TODO; + local $TODO = "Mouse::Role does not currently support 'excludes'"; + ::ok(!$@, "excludes"); no Mouse::Role; -} qr/Mouse::Role does not currently support 'excludes'/; +}; throws_ok { package Role; @@ -89,10 +94,10 @@ lives_ok { ::is(blessed($obj), "Impromptu::Class"); }; -throws_ok { +lives_ok{ package Class; use Mouse; with 'Role', 'Other::Role'; -} qr/Mouse::Role only supports 'with' on individual roles at a time/; +};