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