From: Eden Cardim Date: Fri, 7 May 2010 22:02:25 +0000 (+0000) Subject: fixes to dbicadmin -I test X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=c2c1db3cc6db3aa8d49267978dfb72fd9e7ce41a;p=dbsrgits%2FDBIx-Class-Historic.git fixes to dbicadmin -I test --- diff --git a/t/admin/04include.t b/t/admin/04include.t index 2874934..6213c5a 100644 --- a/t/admin/04include.t +++ b/t/admin/04include.t @@ -12,11 +12,16 @@ BEGIN { if(use_ok 'DBIx::Class::Admin') { my $admin = DBIx::Class::Admin->new( - include_dirs => 't/var/dbicadmincrap/lib', - schema_class => 'Foo' + include_dirs => ['t/var/dbicadmincrap/lib'], + schema_class => 'Foo', + config => { Foo => {} }, + config_stanza => 'Foo' ); lives_ok { $admin->_build_schema } 'should survive attempt to load module located in include_dirs'; - ok($Foo::loaded); + { + no warnings 'once'; + ok($Foo::loaded); + } } done_testing; diff --git a/t/var/dbicadmincrap/lib/Foo.pm b/t/var/dbicadmincrap/lib/Foo.pm new file mode 100644 index 0000000..2801e9e --- /dev/null +++ b/t/var/dbicadmincrap/lib/Foo.pm @@ -0,0 +1,7 @@ +package Foo; + +our $loaded = 1; + +sub connect {} + +1;