Re-added ttvars. Added docs and test for ttvars.
[dbsrgits/SQL-Translator.git] / t / 18ttschema-producer.t
index 91d5bd9..8bf46c6 100644 (file)
@@ -20,7 +20,12 @@ use FindBin qw/$Bin/;
 #=============================================================================
 
 BEGIN {
-    maybe_plan(3, 'Template', 'Test::Differences')
+    maybe_plan(3, 
+        'XML::XPath', 
+        'SQL::Translator::Parser::XML::SQLFairy',
+        'Template', 
+        'Test::Differences'
+    )
 }
 use Test::Differences;
 
@@ -36,8 +41,12 @@ $obj = SQL::Translator->new(
     from           => "XML-SQLFairy",
     filename       => "$Bin/data/xml/schema.xml",
     to             => "TTSchema",
-     producer_args  => {
+    producer_args  => {
         ttfile => "$Bin/data/template/basic.tt",
+        ttargs => {
+            foo   => 'bar',
+            hello => 'world',
+        },
     },
 );
 my $out;
@@ -53,6 +62,9 @@ __DATA__
 Schema: 
 Database: 
 
+Foo: bar
+Hello: world
+
 Table: Basic
 ==========================================================================