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