diff --git a/t/lib/HTFeed/Namespace/Test.pm b/t/lib/HTFeed/Namespace/ClassTest.pm similarity index 77% rename from t/lib/HTFeed/Namespace/Test.pm rename to t/lib/HTFeed/Namespace/ClassTest.pm index 20c5c3f8..a06b876e 100644 --- a/t/lib/HTFeed/Namespace/Test.pm +++ b/t/lib/HTFeed/Namespace/ClassTest.pm @@ -1,4 +1,4 @@ -package HTFeed::Namespace::Test; +package HTFeed::Namespace::ClassTest; use warnings; use strict; diff --git a/t/lib/HTFeed/Test/Class.pm b/t/lib/HTFeed/Test/Class.pm index d7318bb9..24aefb5c 100644 --- a/t/lib/HTFeed/Test/Class.pm +++ b/t/lib/HTFeed/Test/Class.pm @@ -7,10 +7,12 @@ use HTFeed::Config qw(get_config); use File::Path qw(remove_tree); # return testing class, with assumption that $class eq "$testing_class::Test" +# or for example "$testing_class::SomethingTest" + sub testing_class{ my $self = shift; my $class = ref $self; - $class =~ s/::Test$//; + $class =~ s/::\w*Test$//; return $class; } diff --git a/t/lib/HTFeed/Test/Support.pm b/t/lib/HTFeed/Test/Support.pm index b38beba0..e3c7f34b 100644 --- a/t/lib/HTFeed/Test/Support.pm +++ b/t/lib/HTFeed/Test/Support.pm @@ -56,9 +56,10 @@ my @test_classes; my $libDir = "$FindBin::Bin/lib/"; # get the path to each test classes find(sub{ - if (-f and $_ =~ /^Test\.pm$/ ){ + if (-f and $_ =~ /Test\.pm$/ ){ my $name = $File::Find::name; $name =~ s/$libDir//; + return if $name =~ /AbstractTest\.pm$/; push @test_classes, $name; } }, $libDir