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