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|
# 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
+++ /dev/null
-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;
# 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) {
package DBICTestAdminInc;
use base 'DBIx::Class::Schema';
-our $loaded = 1;
-sub connect { bless {}, __PACKAGE__ }
-
-sub deploy { exit 70 } # this is what the test will expect to see
+sub connect { exit 70 } # this is what the test will expect to see
1;