Institute a central "load this first in testing" package
[dbsrgits/DBIx-Class.git] / t / cdbi / early_column_heisenbug.t
1 BEGIN { do "./t/lib/ANFANG.pm" or die ( $@ || $! ) }
2 use DBIx::Class::Optional::Dependencies -skip_all_without => 'cdbicompat';
3
4 use strict;
5 use warnings;
6
7 use Test::More;
8
9 {
10     package Thing;
11     use base qw(DBIx::Class::CDBICompat);
12 }
13
14 {
15     package Stuff;
16     use base qw(DBIx::Class::CDBICompat);
17 }
18
19 # There was a bug where looking at a column group before any were
20 # set would cause them to be shared across classes.
21 is_deeply [Stuff->columns("Essential")], [];
22 Thing->columns(Essential => qw(foo bar baz));
23 is_deeply [Stuff->columns("Essential")], [];
24
25 done_testing;