From: Shawn M Moore Date: Sun, 28 Sep 2008 23:48:18 +0000 (+0000) Subject: Failing test for mixing in a method from a role X-Git-Tag: 0.19~177 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=66cff6126667b053deeac10e72966862e62e8d64;p=gitmo%2FMouse.git Failing test for mixing in a method from a role --- diff --git a/t/404-methods.t b/t/404-methods.t new file mode 100644 index 0000000..f3d4553 --- /dev/null +++ b/t/404-methods.t @@ -0,0 +1,40 @@ +#!/usr/bin/env perl +use strict; +use warnings; +use Test::More; +BEGIN { + if (eval "require Class::Method::Modifiers; 1") { + plan tests => 1; + } + else { + plan skip_all => "Class::Method::Modifiers required for this test"; + } +} +use Mouse::Util ':test'; + +my @calls; + +do { + package Role; + use Mouse::Role; + + sub method { + push @calls, 'Role::method'; + }; + + no Mouse::Role; +}; + +do { + package Class; + use Mouse; + with 'Role'; + + no Mouse; +}; + +Class->method; +is_deeply([splice @calls], [ + 'Role::method', +]); +