10 eval { require Class::Inspector };
11 if ($@ =~ m{Can.t locate Class/Inspector.pm}) {
12 plan skip_all => "ResultSetManager requires Class::Inspector";
19 local $SIG{__WARN__} = sub {};
20 require DBIx::Class::ResultSetManager;
23 use DBICTest::ResultSetManager; # uses Class::Inspector
25 my $schema = DBICTest::ResultSetManager->compose_namespace('DB');
26 my $rs = $schema->resultset('Foo');
28 ok( !DB::Foo->can('bar'), 'Foo class does not have bar method' );
29 ok( $rs->can('bar'), 'Foo resultset class has bar method' );
30 isa_ok( $rs, 'DBICTest::ResultSetManager::Foo::_resultset', 'Foo resultset class is correct' );
31 is( $rs->bar, 'good', 'bar method works' );