Tidy test file
Amiri Barksdale [Fri, 21 May 2010 13:02:39 +0000 (13:02 +0000)]
t/105view_deps.t

index 5d96987..8c8bb9a 100644 (file)
@@ -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;