Commit | Line | Data |
762a7bb2 |
1 | use strict; |
2 | use warnings; |
3 | use Test::More; |
e42bbd7f |
4 | use Test::Warn; |
762a7bb2 |
5 | |
6 | use lib qw(t/lib); |
762a7bb2 |
7 | |
e42bbd7f |
8 | warnings_exist { require DBICTest::ResultSetManager } |
9 | [ |
10 | qr/\QDBIx::Class::ResultSetManager never left experimental status/, |
11 | ], |
12 | 'found deprecation warning' |
13 | ; |
da0d740f |
14 | |
11357d09 |
15 | my $schema = DBICTest::ResultSetManager->compose_namespace('DB'); |
762a7bb2 |
16 | my $rs = $schema->resultset('Foo'); |
17 | |
18 | ok( !DB::Foo->can('bar'), 'Foo class does not have bar method' ); |
19 | ok( $rs->can('bar'), 'Foo resultset class has bar method' ); |
b1fb2c94 |
20 | isa_ok( $rs, 'DBICTest::ResultSetManager::Foo::_resultset', 'Foo resultset class is correct' ); |
cc6504dc |
21 | is( $rs->bar, 'good', 'bar method works' ); |
68de9438 |
22 | |
23 | done_testing; |