From: Dagfinn Ilmari Mannsåker Date: Tue, 1 Oct 2013 19:12:14 +0000 (+0100) Subject: Fix t/storage/replicated.t class loading problem X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=617474ab7e555d02b6953fa2bdc902ee21d06cf2;p=dbsrgits%2FDBIx-Class-Historic.git Fix t/storage/replicated.t class loading problem Do all the skip_all in BEGIN {}, and just 'use' the modules instead of use_ok(). --- diff --git a/Changes b/Changes index 11dfb01..c54b3b7 100644 --- a/Changes +++ b/Changes @@ -14,6 +14,7 @@ Revision history for DBIx::Class - Tests no longer fail if $ENV{DBI_DSN} is set - Throw clearer exception on ->new_related() with a non-existent relationship. + - Fix t/storage/replicated.t class loading problem * Misc - Replace $row with $result in all docs to be consistent and to diff --git a/t/storage/replicated.t b/t/storage/replicated.t index c8d469f..cadd085 100644 --- a/t/storage/replicated.t +++ b/t/storage/replicated.t @@ -10,13 +10,13 @@ BEGIN { require DBIx::Class; plan skip_all => 'Test needs ' . DBIx::Class::Optional::Dependencies->req_missing_for ('test_replicated') unless DBIx::Class::Optional::Dependencies->req_ok_for ('test_replicated'); -} + if (DBICTest::RunMode->is_smoker) { + my $mver = Moose->VERSION; + plan skip_all => "A trial version $mver of Moose detected known to break replication - skipping test known to fail" + if ($mver >= 1.99 and $mver <= 1.9902); + } -if (DBICTest::RunMode->is_smoker) { - my $mver = Moose->VERSION; - plan skip_all => "A trial version $mver of Moose detected known to break replication - skipping test known to fail" - if ($mver >= 1.99 and $mver <= 1.9902); } use Test::Moose; @@ -31,10 +31,10 @@ note "Using Moose version $Moose::VERSION and MooseX::Types version $MooseX::Typ my $var_dir = quotemeta ( File::Spec->catdir(qw/t var/) ); -use_ok 'DBIx::Class::Storage::DBI::Replicated::Pool'; -use_ok 'DBIx::Class::Storage::DBI::Replicated::Balancer'; -use_ok 'DBIx::Class::Storage::DBI::Replicated::Replicant'; -use_ok 'DBIx::Class::Storage::DBI::Replicated'; +use DBIx::Class::Storage::DBI::Replicated::Pool; +use DBIx::Class::Storage::DBI::Replicated::Balancer; +use DBIx::Class::Storage::DBI::Replicated::Replicant; +use DBIx::Class::Storage::DBI::Replicated; =head1 HOW TO USE