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; |
1c94fb11 |
5 | use Test::More; |
6 | plan skip_all => 'Backcompat tests disabled' |
7 | unless $ENV{SCHEMA_LOADER_TESTS_BACKCOMPAT}; |
8 | |
9a95164d |
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 | |
23 | plan tests => 1; |
24 | |
25 | eval { DBICTest::Schema->connect($make_dbictest_db::dsn) }; |
26 | like( |
27 | $@, |
28 | qr/Could not load storage_type loader "DBIx::Class::Schema::Loader::xyzzy": /, |
29 | 'Bad storage type dies correctly' |
30 | ); |