[Bast-commits] r9540 - in DBIx-Class/0.08/trunk: script t/admin
t/lib/testinclude
ribasushi at dev.catalyst.perl.org
ribasushi at dev.catalyst.perl.org
Wed Jun 2 09:44:23 GMT 2010
Author: ribasushi
Date: 2010-06-02 10:44:23 +0100 (Wed, 02 Jun 2010)
New Revision: 9540
Removed:
DBIx-Class/0.08/trunk/t/admin/04include.t
Modified:
DBIx-Class/0.08/trunk/script/dbicadmin
DBIx-Class/0.08/trunk/t/admin/10script.t
DBIx-Class/0.08/trunk/t/lib/testinclude/DBICTestAdminInc.pm
Log:
lib expects a list, not an arrayref
Modified: DBIx-Class/0.08/trunk/script/dbicadmin
===================================================================
--- DBIx-Class/0.08/trunk/script/dbicadmin 2010-06-02 08:44:44 UTC (rev 9539)
+++ DBIx-Class/0.08/trunk/script/dbicadmin 2010-06-02 09:44:23 UTC (rev 9540)
@@ -14,7 +14,6 @@
use DBIx::Class::Admin::Descriptive;
#use Getopt::Long::Descriptive;
use DBIx::Class::Admin;
-require lib;
my $short_description = "utility for administrating DBIx::Class schemata";
my $synopsis_text =q|
@@ -90,11 +89,12 @@
# FIXME - lowercasing will eventually go away when Getopt::Long::Descriptive is fixed
if($opts->{i}) {
- lib->import(delete $opts->{i});
+ require lib;
+ lib->import( @{delete $opts->{i}} );
}
if($opts->{help}) {
- $usage->die();
+ $usage->die();
}
# option compatability mangle
Deleted: DBIx-Class/0.08/trunk/t/admin/04include.t
===================================================================
--- DBIx-Class/0.08/trunk/t/admin/04include.t 2010-06-02 08:44:44 UTC (rev 9539)
+++ DBIx-Class/0.08/trunk/t/admin/04include.t 2010-06-02 09:44:23 UTC (rev 9540)
@@ -1,27 +0,0 @@
-use strict;
-use warnings;
-
-use Test::More;
-use Test::Exception;
-
-BEGIN {
- require DBIx::Class;
- plan skip_all => 'Test needs ' . DBIx::Class::Optional::Dependencies->req_missing_for('admin')
- unless DBIx::Class::Optional::Dependencies->req_ok_for('admin');
-}
-
-if(use_ok 'DBIx::Class::Admin') {
- my $admin = DBIx::Class::Admin->new(
- include_dirs => ['t/lib/testinclude'],
- schema_class => 'DBICTestAdminInc',
- config => { DBICTestAdminInc => {} },
- config_stanza => 'DBICTestAdminInc'
- );
- lives_ok { $admin->_build_schema } 'should survive attempt to load module located in include_dirs';
- {
- no warnings 'once';
- ok($DBICTestAdminInc::loaded);
- }
-}
-
-done_testing;
Modified: DBIx-Class/0.08/trunk/t/admin/10script.t
===================================================================
--- DBIx-Class/0.08/trunk/t/admin/10script.t 2010-06-02 08:44:44 UTC (rev 9539)
+++ DBIx-Class/0.08/trunk/t/admin/10script.t 2010-06-02 09:44:23 UTC (rev 9540)
@@ -21,8 +21,8 @@
# test the script is setting @INC properly
-test_exec (qw| -It/lib/testinclude --schema=DBICTestAdminInc --op=deploy --connect=[] |);
-cmp_ok ( $? >> 8, '==', 70, 'Correct exit code from deploying a custom INC schema' );
+test_exec (qw| -It/lib/testinclude --schema=DBICTestAdminInc --insert --connect=[] |);
+cmp_ok ( $? >> 8, '==', 70, 'Correct exit code from connecting a custom INC schema' );
for my $js (@json_backends) {
Modified: DBIx-Class/0.08/trunk/t/lib/testinclude/DBICTestAdminInc.pm
===================================================================
--- DBIx-Class/0.08/trunk/t/lib/testinclude/DBICTestAdminInc.pm 2010-06-02 08:44:44 UTC (rev 9539)
+++ DBIx-Class/0.08/trunk/t/lib/testinclude/DBICTestAdminInc.pm 2010-06-02 09:44:23 UTC (rev 9540)
@@ -1,9 +1,6 @@
package DBICTestAdminInc;
use base 'DBIx::Class::Schema';
-our $loaded = 1;
-sub connect { bless {}, __PACKAGE__ }
+sub connect { exit 70 } # this is what the test will expect to see
-sub deploy { exit 70 } # this is what the test will expect to see
-
1;
More information about the Bast-commits
mailing list