X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F000-recipes%2F002_schwartz_tutorial.t;h=c15003ef3d78cace9e1660d030ddcdc7d268763e;hb=e650ba5bf38083cced30b94f5e9c104ee2947e98;hp=cad54b43f0e0d30493d060ed532c252fcdeaabe0;hpb=51212d90d006b7d5b497f54b805482f9b14e34e7;p=gitmo%2FMouse.git diff --git a/t/000-recipes/002_schwartz_tutorial.t b/t/000-recipes/002_schwartz_tutorial.t index cad54b4..c15003e 100755 --- a/t/000-recipes/002_schwartz_tutorial.t +++ b/t/000-recipes/002_schwartz_tutorial.t @@ -10,6 +10,17 @@ use strict; use warnings; +use Test::More; + +BEGIN { + plan skip_all => + "This test requires Class::Method::Modifiers or Class::Method::Modifiers::Fast" + unless eval { + require Class::Method::Modifiers::Fast; + } or eval { + require Class::Method::Modifiers; + }; +} # functions to capture the output of the tutorial our $DUMMY_STDOUT = ""; @@ -105,7 +116,7 @@ no Mouse; ###################################################################### # Now the tests package main; -use Test::More tests => 5; +plan tests => 5; #use Horse; my $talking = Horse->new(name => 'Mr. Ed'); @@ -114,7 +125,6 @@ is stdout, "Mr. Ed\n"; $talking->color("grey"); # sets the color $talking->speak; # says "Mr. Ed goes neigh" -TODO: { local $TODO = "this currently fails because of a bug in Class::Method::Modifiers (see RT #42992)"; is stdout, <speak; # prints "Baab goes baaaah" is stdout, <new(name => 'Mickey');