handle column accessor collisions with UNIVERSAL methods
[dbsrgits/DBIx-Class-Schema-Loader.git] / t / 21misc_fatal.t
CommitLineData
fa994d3c 1use strict;
2use Test::More;
3use lib qw(t/lib);
4use 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
19plan tests => 1;
20
21eval { DBICTest::Schema->connect($make_dbictest_db::dsn) };
22like(
23 $@,
517a30e2 24 qr/Could not load loader_class "DBIx::Class::Schema::Loader::xyzzy": /,
fa994d3c 25 'Bad storage type dies correctly'
26);