[Bast-commits] r8974 - in ironman/IronMan-Schema: . t t/var

idn at dev.catalyst.perl.org idn at dev.catalyst.perl.org
Thu Mar 11 19:52:06 GMT 2010


Author: idn
Date: 2010-03-11 19:52:06 +0000 (Thu, 11 Mar 2010)
New Revision: 8974

Added:
   ironman/IronMan-Schema/t/
   ironman/IronMan-Schema/t/01_basic.t
   ironman/IronMan-Schema/t/02_deploy.t
   ironman/IronMan-Schema/t/var/
   ironman/IronMan-Schema/t/var/test.db
Log:
Adding tests.  Will delete t/var on next update.  BOLLOCKS.

Added: ironman/IronMan-Schema/t/01_basic.t
===================================================================
--- ironman/IronMan-Schema/t/01_basic.t	                        (rev 0)
+++ ironman/IronMan-Schema/t/01_basic.t	2010-03-11 19:52:06 UTC (rev 8974)
@@ -0,0 +1,6 @@
+use strict;
+use warnings;
+use Test::More tests => 1;
+
+BEGIN { use_ok 'IronMan::Schema' }
+

Added: ironman/IronMan-Schema/t/02_deploy.t
===================================================================
--- ironman/IronMan-Schema/t/02_deploy.t	                        (rev 0)
+++ ironman/IronMan-Schema/t/02_deploy.t	2010-03-11 19:52:06 UTC (rev 8974)
@@ -0,0 +1,31 @@
+use strict;
+use warnings;
+
+use Test::More;
+
+use IronMan::Schema;
+
+my $schema;
+my $dir = "t/var/";
+my $file = "test.db";
+
+# Check the var directory exists for our testing.
+unless(-d $dir) {
+    mkdir($dir);
+}
+
+# Check we don't already have a test database prior to stomping all over it...
+if(-e $dir . $file) {
+    plan skip_all => 'Test database file already exists.  Skipping creation.';
+} else {
+    plan tests => 3;
+}
+
+ok($schema = IronMan::Schema->connect("dbi:SQLite:$dir$file"), "Creating a schema object");
+ok($schema->deploy(), "Deploying the new schema object");
+
+# Check the file exists
+my $file_exists = (-e $dir . $file);
+
+ok($file_exists, "Test database file exists");
+

Added: ironman/IronMan-Schema/t/var/test.db
===================================================================
(Binary files differ)


Property changes on: ironman/IronMan-Schema/t/var/test.db
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream




More information about the Bast-commits mailing list