Institute a central "load this first in testing" package
[dbsrgits/DBIx-Class.git] / xt / extra / diagnostics / resultset_manager.t
CommitLineData
c0329273 1BEGIN { do "./t/lib/ANFANG.pm" or die ( $@ || $! ) }
2
762a7bb2 3use strict;
4use warnings;
5use Test::More;
e42bbd7f 6use Test::Warn;
762a7bb2 7
c0329273 8
8d6b1478 9use DBICTest;
762a7bb2 10
e42bbd7f 11warnings_exist { require DBICTest::ResultSetManager }
12 [
13 qr/\QDBIx::Class::ResultSetManager never left experimental status/,
14 ],
15 'found deprecation warning'
16;
da0d740f 17
11357d09 18my $schema = DBICTest::ResultSetManager->compose_namespace('DB');
762a7bb2 19my $rs = $schema->resultset('Foo');
20
21ok( !DB::Foo->can('bar'), 'Foo class does not have bar method' );
22ok( $rs->can('bar'), 'Foo resultset class has bar method' );
b1fb2c94 23isa_ok( $rs, 'DBICTest::ResultSetManager::Foo::_resultset', 'Foo resultset class is correct' );
cc6504dc 24is( $rs->bar, 'good', 'bar method works' );
68de9438 25
26done_testing;