Added test for tt_config
[dbsrgits/SQL-Translator.git] / t / lib / Producer / BaseTest.pm
index bc97aab..a8cfe01 100644 (file)
@@ -1,5 +1,9 @@
 package Producer::BaseTest;
 
+#
+# A trivial little sub-class to test sub-classing the TT::Base producer.
+#
+
 use base qw/SQL::Translator::Producer::TT::Base/;
 
 # Make sure we use our new class as the producer
@@ -9,9 +13,15 @@ sub tt_schema { local $/ = undef; return \<DATA>; }
 
 sub tt_vars { ( foo => "bar" ); }
 
+sub tt_config { ( INTERPOLATE => 1 ); }
+
 1;
 
 __DATA__
 Hello World
-[% schema.get_tables %]
-foo:bar
+Tables: [% schema.get_tables %]
+[% table = schema.get_tables.first -%]
+
+$table
+------
+Fields: $table.field_names.join