Commit | Line | Data |
fa994d3c |
1 | use strict; |
f8c2ca5e |
2 | use warnings; |
fa994d3c |
3 | use Test::More; |
4 | use lib qw(t/lib); |
5 | use make_dbictest_db; |
6 | |
7 | { |
8 | $INC{'DBIx/Class/Storage/xyzzy.pm'} = 1; |
9 | package DBIx::Class::Storage::xyzzy; |
10 | use base qw/ DBIx::Class::Storage /; |
11 | sub new { bless {}, shift } |
12 | sub connect_info { @_ } |
13 | |
14 | package DBICTest::Schema; |
15 | use base qw/ DBIx::Class::Schema::Loader /; |
28b4691d |
16 | __PACKAGE__->loader_options( really_erase_my_files => 1 ); |
fa994d3c |
17 | __PACKAGE__->storage_type( '::xyzzy' ); |
18 | } |
19 | |
20 | plan tests => 1; |
21 | |
22 | eval { DBICTest::Schema->connect($make_dbictest_db::dsn) }; |
23 | like( |
24 | $@, |
517a30e2 |
25 | qr/Could not load loader_class "DBIx::Class::Schema::Loader::xyzzy": /, |
fa994d3c |
26 | 'Bad storage type dies correctly' |
27 | ); |