From: Amiri Barksdale Date: Fri, 21 May 2010 13:02:39 +0000 (+0000) Subject: Tidy test file X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d40f513f76069943e2fa62d831b96d4a21637900;p=dbsrgits%2FDBIx-Class-Historic.git Tidy test file --- diff --git a/t/105view_deps.t b/t/105view_deps.t index 5d96987..8c8bb9a 100644 --- a/t/105view_deps.t +++ b/t/105view_deps.t @@ -6,21 +6,22 @@ use warnings; use Test::More; use Test::Exception; use lib qw(t/lib); -use Devel::Dwarn; use ViewDeps; BEGIN { use_ok('DBIx::Class::ResultSource::View'); } +### SANITY + my $view = DBIx::Class::ResultSource::View->new( { name => 'Quux' } ); -isa_ok( $view, 'DBIx::Class::ResultSource' ); -isa_ok( $view, 'DBIx::Class' ); +isa_ok( $view, 'DBIx::Class::ResultSource', 'A new view'); +isa_ok( $view, 'DBIx::Class', 'A new view also'); can_ok( $view, $_ ) for qw/new from depends_on/; -################################# +### DEPS my $schema = ViewDeps->connect; ok( $schema, 'Connected to ViewDeps schema OK' ); @@ -40,10 +41,15 @@ isa_ok( 'DBIx::Class::ResultSource::View', 'though Foo' ); -#diag($schema->resultset('Baz')->result_source->table_class); -isa_ok($schema->resultset('Baz')->result_source, 'DBIx::Class::ResultSource::Table', "Baz on the other hand"); -dies_ok { ViewDeps::Result::Baz->result_source_instance->depends_on( - { ViewDeps::Result::Mixin->result_source_instance->name => 1 } - ) } "...and you cannot use depends_on with that"; +isa_ok( + $schema->resultset('Baz')->result_source, + 'DBIx::Class::ResultSource::Table', + "Baz on the other hand" +); +dies_ok { + ViewDeps::Result::Baz->result_source_instance->depends_on( + { ViewDeps::Result::Mixin->result_source_instance->name => 1 } ); +} +"...and you cannot use depends_on with that"; done_testing;