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); |
8d6b1478 |
7 | use DBICTest; |
762a7bb2 |
8 | |
e42bbd7f |
9 | warnings_exist { require DBICTest::ResultSetManager } |
10 | [ |
11 | qr/\QDBIx::Class::ResultSetManager never left experimental status/, |
12 | ], |
13 | 'found deprecation warning' |
14 | ; |
da0d740f |
15 | |
11357d09 |
16 | my $schema = DBICTest::ResultSetManager->compose_namespace('DB'); |
762a7bb2 |
17 | my $rs = $schema->resultset('Foo'); |
18 | |
19 | ok( !DB::Foo->can('bar'), 'Foo class does not have bar method' ); |
20 | ok( $rs->can('bar'), 'Foo resultset class has bar method' ); |
b1fb2c94 |
21 | isa_ok( $rs, 'DBICTest::ResultSetManager::Foo::_resultset', 'Foo resultset class is correct' ); |
cc6504dc |
22 | is( $rs->bar, 'good', 'bar method works' ); |
68de9438 |
23 | |
24 | done_testing; |