Properly skip known broken tests
Florian Ragwitz [Tue, 1 Mar 2011 13:43:05 +0000 (14:43 +0100)]
Faked passing tests are not cool, and nor are __END__ sections, as those will
break aggregation.

If we actually want to prevent the body of the tests from being compiled,
putting the C<< plan skip_all => ... >> in a BEGIN block is the right thing to
do.

t/aggregate/unit_core_engine_fixenv-iis6.t
t/aggregate/unit_core_engine_fixenv-lighttpd.t

index 917a994..776199d 100644 (file)
@@ -5,10 +5,7 @@ use warnings;
 
 use Test::More;
 
-ok 0, 'Known broken currently';
-done_testing;
-
-__END__
+plan skip_all => 'Known broken currently';
 
 eval "use FCGI";
 plan skip_all => 'FCGI required' if $@;
index da33f3a..ea54e88 100644 (file)
@@ -5,10 +5,7 @@ use warnings;
 
 use Test::More;
 
-ok 0, 'Known broken currently';
-done_testing;
-
-__END__
+plan skip_all => 'Known broken currently';
 
 eval "use FCGI";
 plan skip_all => 'FCGI required' if $@;