[Bast-commits] r6550 - DBIx-Class/0.08/branches/run_file_against_storage/t

jnapiorkowski at dev.catalyst.perl.org jnapiorkowski at dev.catalyst.perl.org
Mon Jun 8 21:32:00 GMT 2009


Author: jnapiorkowski
Date: 2009-06-08 21:32:00 +0000 (Mon, 08 Jun 2009)
New Revision: 6550

Modified:
   DBIx-Class/0.08/branches/run_file_against_storage/t/105-run-file-against-storage.t
Log:
got the tests working again

Modified: DBIx-Class/0.08/branches/run_file_against_storage/t/105-run-file-against-storage.t
===================================================================
--- DBIx-Class/0.08/branches/run_file_against_storage/t/105-run-file-against-storage.t	2009-06-08 21:19:56 UTC (rev 6549)
+++ DBIx-Class/0.08/branches/run_file_against_storage/t/105-run-file-against-storage.t	2009-06-08 21:32:00 UTC (rev 6550)
@@ -1,24 +1,23 @@
 
-use Test::More tests => 13; 
+use Test::More tests => 12; 
 use Test::Exception;
 use lib qw(t/lib);
 
-use_ok( 'DBIx::Class::Schema::ScriptDo' );
 use_ok('DBICTest');
 ok(my $schema = DBICTest->init_schema(), 'got schema');
 
 throws_ok {
-	$schema->_execute_single_statement(qw/asdasdasd/);
+	$schema->storage->_execute_single_statement(qw/asdasdasd/);
 } qr/DBI Exception: DBD::SQLite::db do failed:/, 'Correctly died!';
 
 throws_ok {
-	$schema->_normalize_fh_from_args(qw/t share scriptXXX.sql/);	
+	$schema->storage->_normalize_fh_from_args(qw/t share scriptXXX.sql/);	
 } qr/Can't open file/, 'Dies with bad filehandle';
 
-ok my $fh = $schema->_normalize_fh_from_args(qw/t share script1.sql/),
+ok my $fh = $schema->storage->_normalize_fh_from_args(qw/t share basic.sql/),
   'Got good filehandle';
 
-ok my @lines = $schema->_normalize_lines_from_fh($fh), 'Got some lines';
+ok my @lines = $schema->storage->_normalize_lines_from_fh($fh), 'Got some lines';
 
 is_deeply [@lines], [
   "CREATE TABLE cd_to_producer (",
@@ -57,7 +56,7 @@
   ");",	
 	], 'Got expected lines';
 
-ok my @statements = $schema->_normalize_statements_from_lines(@lines),
+ok my @statements = $schema->storage->_normalize_statements_from_lines(@lines),
    'Got Statements';
 
 is_deeply [@statements], [
@@ -115,11 +114,9 @@
   ], 
 	], 'Got expect Lines';
 	
-	
-ok $schema->_execute_single_statement(
-	'insert into artist( artistid,name )',
-	'values( 777777,"--commented" );',
-	), 'executed statement';
+lives_ok {
+	$schema->storage->_execute_single_statement('insert into artist( artistid,name) values( 777777,"--commented" );');
+} 'executed statement';
 
-ok $schema->run_file_against_storage(qw/t share simple.sql/), 'executed the simple';
-ok $schema->run_file_against_storage(qw/t share killer.sql/), 'executed the killer';
\ No newline at end of file
+ok $schema->storage->run_file_against_storage(qw/t share simple.sql/), 'executed the simple';
+ok $schema->storage->run_file_against_storage(qw/t share killer.sql/), 'executed the killer';
\ No newline at end of file




More information about the Bast-commits mailing list