Add author test for use strict/warnings
[dbsrgits/DBIx-Class-Schema-Loader.git] / t / backcompat / 0.04006 / 21misc_fatal.t
CommitLineData
406a97c2 1use DBIx::Class::Schema::Loader::Optional::Dependencies
2 -skip_all_without => 'test_backcompat';
3
9a95164d 4use strict;
f8c2ca5e 5use warnings;
9a95164d 6use Test::More;
1c94fb11 7use lib qw(t/backcompat/0.04006/lib);
9a95164d 8use make_dbictest_db;
9
10{
11 $INC{'DBIx/Class/Storage/xyzzy.pm'} = 1;
12 package DBIx::Class::Storage::xyzzy;
13 use base qw/ DBIx::Class::Storage /;
14 sub new { bless {}, shift }
15 sub connect_info { @_ }
16
17 package DBICTest::Schema;
18 use base qw/ DBIx::Class::Schema::Loader /;
19 __PACKAGE__->loader_options( really_erase_my_files => 1 );
20 __PACKAGE__->storage_type( '::xyzzy' );
21}
22
23plan tests => 1;
24
25eval { DBICTest::Schema->connect($make_dbictest_db::dsn) };
26like(
27 $@,
088e65fc 28 qr/Could not load loader_class "DBIx::Class::Schema::Loader::xyzzy": /,
9a95164d 29 'Bad storage type dies correctly'
30);