Subject: | [PATCH] tests fail when SQL::Translator is not installed |
Several tests fail when SQL::Translator is not installed
t/schema_DBIC.t 255 65280 5 8 2-5
t/schema_DBIC_Attachment.t 255 65280 12 24 1-12
t/schema_DBIC_Content.t 255 65280 10 20 1-10
t/schema_DBIC_Page.t 255 65280 12 24 1-12
t/schema_DBIC_Person.t 255 65280 1 2 1
t/schema_DBIC_Tag.t 255 65280 4 8 1-4
To prevent these failures, the following test skips are needed.
--- t/schema_DBIC.t.old 2007-09-13 07:41:04.000000000 -0500
+++ t/schema_DBIC.t 2007-09-17 08:25:38.000000000 -0500
@@ -4,9 +4,12 @@
BEGIN {
eval "use DBD::SQLite";
- plan $@
- ? ( skip_all => 'needs DBD::SQLite for testing' )
- : ( tests => 5 );
+ my $sqlite = ! $@;
+ eval "use SQL::Translator";
+ my $translator = ! $@;
+ plan $sqlite && $translator
+ ? ( tests => 5 )
+ : ( skip_all => 'needs DBD::SQLite and SQL::Translator for
testing' ) ;
}
BEGIN {
--- t/schema_DBIC_Attachment.t.old 2007-09-17 08:26:52.000000000 -0500
+++ t/schema_DBIC_Attachment.t 2007-09-17 08:29:09.000000000 -0500
@@ -4,9 +4,12 @@
BEGIN {
eval "use DBD::SQLite";
- plan $@
- ? ( skip_all => 'needs DBD::SQLite for testing' )
- : ( tests => 12 );
+ my $sqlite = ! $@;
+ eval "use SQL::Translator";
+ my $translator = ! $@;
+ plan $sqlite && $translator
+ ? ( tests => 12 )
+ : ( skip_all => 'needs DBD::SQLite and SQL::Translator for
testing' ) ;
}
use lib qw(t/lib);
--- t/schema_DBIC_Content.t.old 2007-09-17 08:27:00.000000000 -0500
+++ t/schema_DBIC_Content.t 2007-09-17 08:31:10.000000000 -0500
@@ -4,9 +4,12 @@
BEGIN {
eval "use DBD::SQLite";
- plan $@
- ? ( skip_all => 'needs DBD::SQLite for testing' )
- : ( tests => 10 );
+ my $sqlite = ! $@;
+ eval "use SQL::Translator";
+ my $translator = ! $@;
+ plan $sqlite && $translator
+ ? ( tests => 10 )
+ : ( skip_all => 'needs DBD::SQLite and SQL::Translator for
testing' ) ;
}
use lib qw(t/lib);
--- t/schema_DBIC_Page.t.old 2007-09-17 08:27:08.000000000 -0500
+++ t/schema_DBIC_Page.t 2007-09-17 08:32:04.000000000 -0500
@@ -4,9 +4,12 @@
BEGIN {
eval "use DBD::SQLite";
- plan $@
- ? ( skip_all => 'needs DBD::SQLite for testing' )
- : ( tests => 12 );
+ my $sqlite = ! $@;
+ eval "use SQL::Translator";
+ my $translator = ! $@;
+ plan $sqlite && $translator
+ ? ( tests => 12 )
+ : ( skip_all => 'needs DBD::SQLite and SQL::Translator for
testing' ) ;
}
use lib qw(t/lib);
--- t/schema_DBIC_Person.t.old 2007-09-17 08:27:16.000000000 -0500
+++ t/schema_DBIC_Person.t 2007-09-17 08:38:29.000000000 -0500
@@ -4,9 +4,12 @@
BEGIN {
eval "use DBD::SQLite";
- plan $@
- ? ( skip_all => 'needs DBD::SQLite for testing' )
- : ( tests => 1 );
+ my $sqlite = ! $@;
+ eval "use SQL::Translator";
+ my $translator = ! $@;
+ plan $sqlite && $translator
+ ? ( tests => 1 )
+ : ( skip_all => 'needs DBD::SQLite and SQL::Translator for
testing' ) ;
}
use lib qw(t/lib);
--- t/schema_DBIC_Tag.t.old 2007-09-13 07:41:04.000000000 -0500
+++ t/schema_DBIC_Tag.t 2007-09-17 08:21:13.000000000 -0500
@@ -4,9 +4,12 @@
BEGIN {
eval "use DBD::SQLite";
- plan $@
- ? ( skip_all => 'needs DBD::SQLite for testing' )
- : ( tests => 4 );
+ my $sqlite = ! $@;
+ eval "use SQL::Translator";
+ my $translator = ! $@;
+ plan $sqlite && $translator
+ ? ( tests => 4 )
+ : ( skip_all => 'needs DBD::SQLite and SQL::Translator for
testing' ) ;
}
use lib qw(t/lib);