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