Suppress replicated test warnings on win32 as well
Peter Rabbitson [Thu, 18 Nov 2010 07:10:48 +0000 (08:10 +0100)]
t/storage/replicated.t

index 38ddcb1..56d141a 100644 (file)
@@ -22,6 +22,8 @@ note "Using Moose version $Moose::VERSION and MooseX::Types version $MooseX::Typ
 use lib qw(t/lib);
 use DBICTest;
 
+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';
@@ -381,7 +383,7 @@ ok @replicant_names, "found replicant names @replicant_names";
 ## Silence warning about not supporting the is_replicating method if using the
 ## sqlite dbs.
 $replicated->schema->storage->debugobj->silence(1)
-  if first { m{^t/} } @replicant_names;
+  if first { $_ =~ /$var_dir/ } @replicant_names;
 
 isa_ok $replicated->schema->storage->balancer->current_replicant
     => 'DBIx::Class::Storage::DBI';
@@ -429,7 +431,7 @@ $replicated->schema->storage->replicants->{$replicant_names[1]}->active(1);
 ## Silence warning about not supporting the is_replicating method if using the
 ## sqlite dbs.
 $replicated->schema->storage->debugobj->silence(1)
-  if first { m{^t/} } @replicant_names;
+  if first { $_ =~ /$var_dir/ } @replicant_names;
 
 $replicated->schema->storage->pool->validate_replicants;
 
@@ -612,7 +614,7 @@ $replicated->schema->storage->replicants->{$replicant_names[1]}->active(1);
 ## Silence warning about not supporting the is_replicating method if using the
 ## sqlite dbs.
 $replicated->schema->storage->debugobj->silence(1)
-  if first { m{^t/} } @replicant_names;
+  if first { $_ =~ /$var_dir/ } @replicant_names;
 
 $replicated->schema->storage->pool->validate_replicants;