X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F40resultsetmanager.t;h=45c6e3e6a59ef4d4825d8af38e7f0337e25cd2b0;hb=93963f599878e7c2808c58083d214da5270a2691;hp=bdec1596114b46ad919fc6b311d6507aa043c78e;hpb=b1fb2c941d66c82f2704e51f53bca84b9edfc2aa;p=dbsrgits%2FDBIx-Class.git diff --git a/t/40resultsetmanager.t b/t/40resultsetmanager.t index bdec159..45c6e3e 100644 --- a/t/40resultsetmanager.t +++ b/t/40resultsetmanager.t @@ -1,26 +1,23 @@ -#!/usr/bin/perl - use strict; use warnings; use Test::More; +use Test::Warn; use lib qw(t/lib); -BEGIN { - eval { require Class::Inspector }; - if ($@ =~ m{Can.t locate Class/Inspector.pm}) { - plan skip_all => "ResultSetManager requires Class::Inspector"; - } else { - plan tests => 4; - } -} - -use DBICTest::ResultSetManager; # uses Class::Inspector +warnings_exist { require DBICTest::ResultSetManager } + [ + qr/\QDBIx::Class::ResultSetManager never left experimental status/, + ], + 'found deprecation warning' +; -my $schema = DBICTest::ResultSetManager->compose_connection('DB', 'foo'); +my $schema = DBICTest::ResultSetManager->compose_namespace('DB'); my $rs = $schema->resultset('Foo'); ok( !DB::Foo->can('bar'), 'Foo class does not have bar method' ); ok( $rs->can('bar'), 'Foo resultset class has bar method' ); isa_ok( $rs, 'DBICTest::ResultSetManager::Foo::_resultset', 'Foo resultset class is correct' ); is( $rs->bar, 'good', 'bar method works' ); + +done_testing;