Remove unused includes in View.pm, remove abstract test Schema classes. --AKB
Amiri Barksdale [Mon, 31 May 2010 14:03:56 +0000 (14:03 +0000)]
lib/DBIx/Class/ResultSource/View.pm
t/105view_deps.t
t/lib/ViewDeps/Result/Bar.pm [deleted file]
t/lib/ViewDeps/Result/Baz.pm [deleted file]
t/lib/ViewDeps/Result/Foo.pm [deleted file]
t/lib/ViewDeps/Result/JustATable.pm [deleted file]
t/lib/ViewDeps/Result/Mixin.pm [deleted file]
t/lib/ViewDeps/Result/Quux.pm [deleted file]

index 6693060..1757924 100644 (file)
@@ -4,8 +4,6 @@ use strict;
 use warnings;
 
 use DBIx::Class::ResultSet;
-use SQL::Translator::Parser::DBIx::Class;
-use Data::Dumper::Concise;
 
 use base qw/DBIx::Class/;
 __PACKAGE__->load_components(qw/ResultSource/);
index b584cbd..e55d2a6 100644 (file)
@@ -40,7 +40,9 @@ isa_ok( $schema->resultset('Bar')->result_source,
 
 is( $bar_deps[0], 'baz',   'which is reported to depend on baz...' );
 is( $bar_deps[1], 'mixin', 'and on mixin.' );
-is( $foo_deps[0], undef,   'Foo has no dependencies...' );
+is( $foo_deps[0], undef,   'Foo has no declared dependencies...' );
+
+
 
 isa_ok(
     $schema->resultset('Foo')->result_source,
diff --git a/t/lib/ViewDeps/Result/Bar.pm b/t/lib/ViewDeps/Result/Bar.pm
deleted file mode 100644 (file)
index b81d430..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-package    # hide from PAUSE
-    ViewDeps::Result::Bar;
-
-use strict;
-use warnings;
-use base qw/ViewDeps::Result::Foo/;
-
-require ViewDeps::Result::Mixin;
-
-__PACKAGE__->table('bar');
-
-__PACKAGE__->result_source_instance->deploy_depends_on(
-    ["ViewDeps::Result::Mixin", "ViewDeps::Result::Baz"] );
-
-__PACKAGE__->add_columns( b => { data_type => 'integer' } );
-
-__PACKAGE__->belongs_to(
-    'table',
-    'ViewDeps::Result::JustATable',
-    { 'foreign.id' => 'self.b' },
-);
-
-__PACKAGE__->has_many( 'foos', 'ViewDeps::Result::Foo',
-    { 'foreign.id' => 'self.id' } );
-
-1;
diff --git a/t/lib/ViewDeps/Result/Baz.pm b/t/lib/ViewDeps/Result/Baz.pm
deleted file mode 100644 (file)
index db80ab2..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-package    # hide from PAUSE
-    ViewDeps::Result::Baz;
-## Used in 105view_deps.t
-
-use strict;
-use warnings;
-use base qw(DBIx::Class::Core);
-
-__PACKAGE__->table('baz');
-
-__PACKAGE__->add_columns( id => { data_type => 'integer' } );
-
-__PACKAGE__->belongs_to(
-    'table',
-    'ViewDeps::Result::JustATable',
-    { 'foreign.id' => 'self.b' },
-);
-
-__PACKAGE__->has_many( 'foos', 'ViewDeps::Result::Foo',
-    { 'foreign.a' => 'self.id' } );
-
-1;
diff --git a/t/lib/ViewDeps/Result/Foo.pm b/t/lib/ViewDeps/Result/Foo.pm
deleted file mode 100644 (file)
index 07f7c90..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-package    # hide from PAUSE
-    ViewDeps::Result::Foo;
-
-use strict;
-use warnings;
-use base qw(ViewDeps::Result::Quux);
-
-__PACKAGE__->table_class('DBIx::Class::ResultSource::View');
-__PACKAGE__->table('foo');
-
-__PACKAGE__->result_source_instance->view_definition(
-    "select * from just_a_table");
-
-__PACKAGE__->add_columns(
-    id => { data_type => 'integer', is_auto_increment => 1 },
-    a  => { data_type => 'integer', is_nullable       => 1 }
-);
-
-__PACKAGE__->set_primary_key('id');
-
-__PACKAGE__->belongs_to( 'bar', 'ViewDeps::Result::Bar',
-    { 'foreign.id' => 'self.a' } );
-
-1;
diff --git a/t/lib/ViewDeps/Result/JustATable.pm b/t/lib/ViewDeps/Result/JustATable.pm
deleted file mode 100644 (file)
index 7281b17..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-package    # hide from PAUSE
-    ViewDeps::Result::JustATable;
-## Used in 105view_deps.t
-
-use base qw(DBIx::Class::Core);
-
-__PACKAGE__->table('just_a_table');
-
-__PACKAGE__->add_columns(
-    id   => { data_type => 'integer', is_auto_increment => 1 },
-    name => { data_type => 'varchar', size              => 255 }
-);
-
-__PACKAGE__->set_primary_key('id');
-
-__PACKAGE__->has_many( 'bars', 'ViewDeps::Result::Bar',
-    { 'foreign.b' => 'self.id' } );
-
-1;
diff --git a/t/lib/ViewDeps/Result/Mixin.pm b/t/lib/ViewDeps/Result/Mixin.pm
deleted file mode 100644 (file)
index b45dd94..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-package # hide from PAUSE
-    ViewDeps::Result::Mixin;
-## Used in 105view_deps.t
-
-use strict;
-use warnings;
-use base qw(DBIx::Class::Core);
-
-__PACKAGE__->table('mixin');
-
-__PACKAGE__->add_columns(
-  id => {
-    data_type => 'integer', is_auto_increment => 1, sequence => 'foo_id_seq'
-  },
-  words => { data_type => 'text' }
-);
-
-__PACKAGE__->set_primary_key('id');
-
-1;
diff --git a/t/lib/ViewDeps/Result/Quux.pm b/t/lib/ViewDeps/Result/Quux.pm
deleted file mode 100644 (file)
index 77862f6..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-package    # hide from PAUSE
-    ViewDeps::Result::Quux;
-
-use strict;
-use warnings;
-use base qw(DBIx::Class::Core);
-
-__PACKAGE__->table_class('DBIx::Class::ResultSource::View');
-__PACKAGE__->table('quux');
-
-__PACKAGE__->result_source_instance->view_definition(
-    "select * from quux");
-
-__PACKAGE__->add_columns(
-    etc => { data_type => 'text' },
-    c  => { data_type => 'integer', is_nullable => 1 }
-);
-
-__PACKAGE__->set_primary_key('c');
-
-__PACKAGE__->belongs_to( 'foo', 'ViewDeps::Result::Foo',
-    { 'foreign.a' => 'self.c' } );
-
-1;