Improve trigger 'scope' attribute support (RT#119997)
[dbsrgits/SQL-Translator.git] / lib / Test / SQL / Translator.pm
index cc9f5d5..9856350 100644 (file)
@@ -284,6 +284,9 @@ sub trigger_ok {
     is( $obj->on_table, $test->{on_table},
         "$t_name    on_table is '$test->{on_table}'" );
 
+    is( $obj->scope, $test->{scope}, "$t_name    scope is '$test->{scope}'" )
+        if exists $test->{scope};
+
     is( $obj->action, $test->{action}, "$t_name    action is '$test->{action}'" );
 
     is_deeply( { $obj->extra }, $test->{extra}, "$t_name    extra" );
@@ -459,6 +462,9 @@ sub maybe_plan {
         elsif ($@ =~ /([\w\:]+ version [\d\.]+) required.+?this is only version/) {
             push @errors, $1;
         }
+        elsif ($@ =~ /Can't load .+? for module .+?DynaLoader\.pm/i ) {
+          push @errors, $module;
+        }
     }
 
     if (@errors) {
@@ -536,7 +542,7 @@ __END__
 
 Provides a set of Test::More tests for Schema objects. Testing a parsed
 schema is then as easy as writing a perl data structure describing how you
-expect the schema to look. Also provides maybe_plan for conditionally running
+expect the schema to look. Also provides C<maybe_plan> for conditionally running
 tests based on their dependencies.
 
 The data structures given to the test subs don't have to include all the
@@ -600,14 +606,14 @@ maybe_plan
 
 =item Test Count Constants
 
-Constants to give the number of tests each *_ok sub uses. e.g. How many tests
-does field_ok run? Can then use these to set up the test plan easily.
+Constants to give the number of tests each C<*_ok> sub uses. e.g. How many tests
+does C<field_ok> run? Can then use these to set up the test plan easily.
 
 =item Test skipping
 
 As the test subs wrap up lots of tests in one call you can't skip individual
 tests only whole sets e.g. a whole table or field.
-We could add skip_* items to the test hashes to allow per test skips. e.g.
+We could add C<skip_*> items to the test hashes to allow per test skips. e.g.
 
  skip_is_primary_key => "Need to fix primary key parsing.",