From: Peter Rabbitson Date: Sat, 6 Mar 2010 12:18:01 +0000 (+0000) Subject: me-- not thinking X-Git-Tag: v0.08121~81 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=823c91a18ccb75b3bd2e9adf87139b612c96ba86;p=dbsrgits%2FDBIx-Class.git me-- not thinking --- diff --git a/t/inflate/file_column.t b/t/inflate/file_column.t index 4de177a..7f0eddd 100644 --- a/t/inflate/file_column.t +++ b/t/inflate/file_column.t @@ -3,16 +3,20 @@ use warnings; use Test::More; use lib qw(t/lib); + +# inject IC::File into the result baseclass for testing +BEGIN { + $ENV{DBIC_IC_FILE_NOWARN} = 1; + require DBICTest::BaseResult; + DBICTest::BaseResult->load_components (qw/InflateColumn::File/); +} + + use DBICTest; -use DBICTest::Schema; use File::Compare; use Path::Class qw/file/; -$ENV{DBIC_IC_FILE_NOWARN} = 1; - -DBICTest::Schema->load_classes ('FileColumn'); -my $schema = DBICTest::Schema->connect(DBICTest->_database); -DBICTest->deploy_schema ($schema); +my $schema = DBICTest->init_schema; plan tests => 10; diff --git a/t/lib/DBICTest/Schema.pm b/t/lib/DBICTest/Schema.pm index ac8c5ba..a3e4484 100644 --- a/t/lib/DBICTest/Schema.pm +++ b/t/lib/DBICTest/Schema.pm @@ -11,6 +11,7 @@ __PACKAGE__->load_classes(qw/ BindType Employee CD + FileColumn Genre Link Bookmark diff --git a/t/lib/DBICTest/Schema/FileColumn.pm b/t/lib/DBICTest/Schema/FileColumn.pm index 82fcebd..046e7c2 100644 --- a/t/lib/DBICTest/Schema/FileColumn.pm +++ b/t/lib/DBICTest/Schema/FileColumn.pm @@ -6,8 +6,6 @@ use warnings; use base qw/DBICTest::BaseResult/; use File::Temp qw/tempdir/; -__PACKAGE__->load_components(qw/InflateColumn::File/); - __PACKAGE__->table('file_columns'); __PACKAGE__->add_columns( diff --git a/t/lib/sqlite.sql b/t/lib/sqlite.sql index d90842d..cce0275 100644 --- a/t/lib/sqlite.sql +++ b/t/lib/sqlite.sql @@ -1,6 +1,6 @@ -- -- Created by SQL::Translator::Producer::SQLite --- Created on Sat Mar 6 12:26:40 2010 +-- Created on Sat Mar 6 13:01:48 2010 -- ; @@ -68,6 +68,14 @@ CREATE TABLE event ( ); -- +-- Table: file_columns +-- +CREATE TABLE file_columns ( + id INTEGER PRIMARY KEY NOT NULL, + file varchar(255) NOT NULL +); + +-- -- Table: fourkeys -- CREATE TABLE fourkeys (