[Bast-commits] r5932 - trunk/DBIx-Class-Tree/t
ribasushi at dev.catalyst.perl.org
ribasushi at dev.catalyst.perl.org
Tue Apr 21 12:48:26 GMT 2009
Author: ribasushi
Date: 2009-04-21 13:48:26 +0100 (Tue, 21 Apr 2009)
New Revision: 5932
Modified:
trunk/DBIx-Class-Tree/t/10_adjacencylist.t
trunk/DBIx-Class-Tree/t/11_adjacencylist_ordered.t
Log:
Fix borked tests
Modified: trunk/DBIx-Class-Tree/t/10_adjacencylist.t
===================================================================
--- trunk/DBIx-Class-Tree/t/10_adjacencylist.t 2009-04-21 11:11:43 UTC (rev 5931)
+++ trunk/DBIx-Class-Tree/t/10_adjacencylist.t 2009-04-21 12:48:26 UTC (rev 5932)
@@ -4,14 +4,20 @@
use lib 't/lib';
use Test::More;
-use TreeTest;
-TreeTest::Schema::Node->load_components(qw(
+BEGIN { # This must happen before the schema is loaded
+
+ require TreeTest::Schema::Node;
+
+ TreeTest::Schema::Node->load_components(qw(
Tree::AdjacencyList
-));
+ ));
-TreeTest::Schema::Node->parent_column( 'parent_id' );
+ TreeTest::Schema::Node->parent_column( 'parent_id' );
+}
+use TreeTest;
+
my $tests = TreeTest::count_tests();
plan tests => $tests;
TreeTest::run_tests();
Modified: trunk/DBIx-Class-Tree/t/11_adjacencylist_ordered.t
===================================================================
--- trunk/DBIx-Class-Tree/t/11_adjacencylist_ordered.t 2009-04-21 11:11:43 UTC (rev 5931)
+++ trunk/DBIx-Class-Tree/t/11_adjacencylist_ordered.t 2009-04-21 12:48:26 UTC (rev 5932)
@@ -4,15 +4,20 @@
use lib 't/lib';
use Test::More;
-use TreeTest;
-TreeTest::Schema::Node->load_components(qw(
+BEGIN { # This must happen before the schema is loaded
+
+ require TreeTest::Schema::Node;
+
+ TreeTest::Schema::Node->load_components(qw(
Tree::AdjacencyList::Ordered
-));
+ ));
-TreeTest::Schema::Node->position_column( 'position' );
-TreeTest::Schema::Node->parent_column( 'parent_id' );
+ TreeTest::Schema::Node->position_column( 'position' );
+ TreeTest::Schema::Node->parent_column( 'parent_id' );
+}
+use TreeTest;
my $tests = TreeTest::count_tests();
plan tests => $tests;
TreeTest::run_tests();
More information about the Bast-commits
mailing list