6 use Class::Inspector ();
8 unshift(@INC, './t/lib');
14 is(DBICTest::Schema->source('Artist')->resultset_class, 'DBIx::Class::ResultSet', 'default resultset class');
15 ok(!Class::Inspector->loaded('DBICNSTest::ResultSet::A'), 'custom resultset class not loaded');
16 DBICTest::Schema->source('Artist')->resultset_class('DBICNSTest::ResultSet::A');
17 ok(Class::Inspector->loaded('DBICNSTest::ResultSet::A'), 'custom resultset class loaded automatically');
18 is(DBICTest::Schema->source('Artist')->resultset_class, 'DBICNSTest::ResultSet::A', 'custom resultset class set');
20 my $schema = DBICTest->init_schema;
21 my $resultset = $schema->resultset('Artist')->search;
22 isa_ok($resultset, 'DBICNSTest::ResultSet::A', 'resultset is custom class');