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/;
+{
+ local $ENV{DBIC_IC_FILE_NOWARN} = 1;
+
+ package DBICTest::Schema::FileColumn;
+
+ use strict;
+ 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(
+ id => { data_type => 'integer', is_auto_increment => 1 },
+ file => {
+ data_type => 'varchar',
+ is_file_column => 1,
+ file_column_path => tempdir(CLEANUP => 1),
+ size => 255
+ }
+ );
+
+ __PACKAGE__->set_primary_key('id');
+}
+DBICTest::Schema->load_classes('FileColumn');
+
my $schema = DBICTest->init_schema;
plan tests => 10;
+++ /dev/null
-package
-DBICTest::Schema::FileColumn;
-
-use strict;
-use warnings;
-use base qw/DBICTest::BaseResult/;
-use File::Temp qw/tempdir/;
-
-__PACKAGE__->table('file_columns');
-
-__PACKAGE__->add_columns(
- id => { data_type => 'integer', is_auto_increment => 1 },
- file => {
- data_type => 'varchar',
- is_file_column => 1,
- file_column_path => tempdir(CLEANUP => 1),
- size => 255
- }
-);
-
-__PACKAGE__->set_primary_key('id');
-
-1;
--
-- Created by SQL::Translator::Producer::SQLite
--- Created on Mon Feb 21 12:10:04 2011
+-- Created on Tue Feb 22 18:42:16 2011
--
--
);
--
--- Table: file_columns
---
-CREATE TABLE file_columns (
- id INTEGER PRIMARY KEY NOT NULL,
- file varchar(255) NOT NULL
-);
-
---
-- Table: fourkeys
--
CREATE TABLE fourkeys (