[Bast-commits] r8925 - in DBIx-Class/0.08/trunk: lib/DBIx/Class/Optional t

ribasushi at dev.catalyst.perl.org ribasushi at dev.catalyst.perl.org
Sun Mar 7 02:22:07 GMT 2010


Author: ribasushi
Date: 2010-03-07 02:22:07 +0000 (Sun, 07 Mar 2010)
New Revision: 8925

Modified:
   DBIx-Class/0.08/trunk/lib/DBIx/Class/Optional/Dependencies.pm
   DBIx-Class/0.08/trunk/t/06notabs.t
   DBIx-Class/0.08/trunk/t/07eol.t
   DBIx-Class/0.08/trunk/t/87ordered.t
Log:
Switch NoTab/EOL checks to Opt::Deps
Enable NoTab checks
Disable EOL checks

Modified: DBIx-Class/0.08/trunk/lib/DBIx/Class/Optional/Dependencies.pm
===================================================================
--- DBIx-Class/0.08/trunk/lib/DBIx/Class/Optional/Dependencies.pm	2010-03-07 01:58:09 UTC (rev 8924)
+++ DBIx-Class/0.08/trunk/lib/DBIx/Class/Optional/Dependencies.pm	2010-03-07 02:22:07 UTC (rev 8925)
@@ -90,13 +90,13 @@
 
   test_notabs => {
     req => {
-      #'Test::NoTabs'              => '0.9',
+      'Test::NoTabs'              => '0.9',
     },
   },
 
   test_eol => {
     req => {
-      #'Test::EOL'                 => '0.6',
+      'Test::EOL'                 => '0.6',
     },
   },
 

Modified: DBIx-Class/0.08/trunk/t/06notabs.t
===================================================================
--- DBIx-Class/0.08/trunk/t/06notabs.t	2010-03-07 01:58:09 UTC (rev 8924)
+++ DBIx-Class/0.08/trunk/t/06notabs.t	2010-03-07 02:22:07 UTC (rev 8925)
@@ -5,26 +5,20 @@
 use lib 't/lib';
 use DBICTest;
 
-my @MODULES = (
-  'Test::NoTabs 0.9',
-);
-
-plan skip_all => 'Does not work with done_testing, temp disabled';
-
 # Don't run tests for installs
 unless ( DBICTest::AuthorCheck->is_author || $ENV{AUTOMATED_TESTING} || $ENV{RELEASE_TESTING} ) {
   plan( skip_all => "Author tests not required for installation" );
 }
-# Load the testing modules
-foreach my $MODULE ( @MODULES ) {
-  eval "use $MODULE";
-  if ( $@ ) {
-    $ENV{RELEASE_TESTING}
-    ? die( "Failed to load required release-testing module $MODULE" )
-    : plan( skip_all => "$MODULE not available for testing" );
-  }
+
+require DBIx::Class;
+unless ( DBIx::Class::Optional::Dependencies->req_ok_for ('test_notabs') ) {
+  my $missing = DBIx::Class::Optional::Dependencies->req_missing_for ('test_notabs');
+  $ENV{RELEASE_TESTING} || DBICTest::AuthorCheck->is_author
+    ? die ("Failed to load release-testing module requirements: $missing")
+    : plan skip_all => "Test needs: $missing"
 }
 
-all_perl_files_ok(qw/t lib script maint/);
+Test::NoTabs::all_perl_files_ok(qw/t lib script maint/);
 
-done_testing;
+# FIXME - need to fix Test::NoTabs
+#done_testing;

Modified: DBIx-Class/0.08/trunk/t/07eol.t
===================================================================
--- DBIx-Class/0.08/trunk/t/07eol.t	2010-03-07 01:58:09 UTC (rev 8924)
+++ DBIx-Class/0.08/trunk/t/07eol.t	2010-03-07 02:22:07 UTC (rev 8925)
@@ -5,29 +5,25 @@
 use lib 't/lib';
 use DBICTest;
 
-my @MODULES = (
-  'Test::EOL 0.6',
-);
-
-plan skip_all => 'Does not work with done_testing, temp disabled';
-
 # Don't run tests for installs
 unless ( DBICTest::AuthorCheck->is_author || $ENV{AUTOMATED_TESTING} || $ENV{RELEASE_TESTING} ) {
   plan( skip_all => "Author tests not required for installation" );
 }
-# Load the testing modules
-foreach my $MODULE ( @MODULES ) {
-  eval "use $MODULE";
-  if ( $@ ) {
-    $ENV{RELEASE_TESTING}
-    ? die( "Failed to load required release-testing module $MODULE" )
-    : plan( skip_all => "$MODULE not available for testing" );
-  }
+
+plan skip_all => 'Test::EOL very broken';
+
+require DBIx::Class;
+unless ( DBIx::Class::Optional::Dependencies->req_ok_for ('test_eol') ) {
+  my $missing = DBIx::Class::Optional::Dependencies->req_missing_for ('test_eol');
+  $ENV{RELEASE_TESTING} || DBICTest::AuthorCheck->is_author
+    ? die ("Failed to load release-testing module requirements: $missing")
+    : plan skip_all => "Test needs: $missing"
 }
 
 TODO: {
   local $TODO = 'Do not fix those yet - we have way too many branches out there, merging will be hell';
-  all_perl_files_ok({ trailing_whitespace => 1}, qw/t lib script maint/);
+  Test::EOL::all_perl_files_ok({ trailing_whitespace => 1}, qw/t lib script maint/);
 }
 
-done_testing;
+# FIXME - need to fix Test::EOL
+#done_testing;

Modified: DBIx-Class/0.08/trunk/t/87ordered.t
===================================================================
--- DBIx-Class/0.08/trunk/t/87ordered.t	2010-03-07 01:58:09 UTC (rev 8924)
+++ DBIx-Class/0.08/trunk/t/87ordered.t	2010-03-07 02:22:07 UTC (rev 8925)
@@ -64,36 +64,36 @@
 $employee->group_id(1);
 $employee->update;
 ok(
-	check_rs($employees->search_rs({group_id=>1})) && check_rs($employees->search_rs({group_id=>4})),
-	"overloaded update 3"
+  check_rs($employees->search_rs({group_id=>1})) && check_rs($employees->search_rs({group_id=>4})),
+  "overloaded update 3"
 );
 $employee = $employees->search({group_id=>4})->first;
 $employee->update({group_id=>2});
 ok(
-	check_rs($employees->search_rs({group_id=>2})) && check_rs($employees->search_rs({group_id=>4})),
-	"overloaded update 4"
+  check_rs($employees->search_rs({group_id=>2})) && check_rs($employees->search_rs({group_id=>4})),
+  "overloaded update 4"
 );
 $employee = $employees->search({group_id=>4})->first;
 $employee->group_id(1);
 $employee->position(3);
 $employee->update;
 ok(
-	check_rs($employees->search_rs({group_id=>1})) && check_rs($employees->search_rs({group_id=>4})),
-	"overloaded update 5"
+  check_rs($employees->search_rs({group_id=>1})) && check_rs($employees->search_rs({group_id=>4})),
+  "overloaded update 5"
 );
 $employee = $employees->search({group_id=>4})->first;
 $employee->group_id(2);
 $employee->position(undef);
 $employee->update;
 ok(
-	check_rs($employees->search_rs({group_id=>2})) && check_rs($employees->search_rs({group_id=>4})),
-	"overloaded update 6"
+  check_rs($employees->search_rs({group_id=>2})) && check_rs($employees->search_rs({group_id=>4})),
+  "overloaded update 6"
 );
 $employee = $employees->search({group_id=>4})->first;
 $employee->update({group_id=>1,position=>undef});
 ok(
-	check_rs($employees->search_rs({group_id=>1})) && check_rs($employees->search_rs({group_id=>4})),
-	"overloaded update 7"
+  check_rs($employees->search_rs({group_id=>1})) && check_rs($employees->search_rs({group_id=>4})),
+  "overloaded update 7"
 );
 
 # multicol tests begin here
@@ -154,7 +154,7 @@
 $employee = $employees->search({group_id_2=>4, group_id_3=>1})->first;
 $employee->group_id_2(1);
 $employee->update;
-ok( 
+ok(
     check_rs($employees->search_rs({group_id_2=>4, group_id_3=>1}))
     && check_rs($employees->search_rs({group_id_2=>1, group_id_3=>1})), 
     "overloaded multicol update 1" 




More information about the Bast-commits mailing list