From: Peter Rabbitson <ribasushi@cpan.org>
Date: Tue, 19 Jan 2016 20:45:32 +0000 (+0100)
Subject: Audit/simplify various ->is_* runmode specs
X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=6853e2c32de07a3cec73855597ccc8b863cd4d54;p=dbsrgits%2FDBIx-Class.git

Audit/simplify various ->is_* runmode specs
---

diff --git a/t/lib/DBICTest/RunMode.pm b/t/lib/DBICTest/RunMode.pm
index b8664db..fb36805 100644
--- a/t/lib/DBICTest/RunMode.pm
+++ b/t/lib/DBICTest/RunMode.pm
@@ -209,11 +209,11 @@ sub is_author {
 }
 
 sub is_smoker {
-  return
-    __PACKAGE__->is_ci
-      ||
+  return (
     ( $ENV{AUTOMATED_TESTING} && ! $ENV{PERL5_CPANM_IS_RUNNING} && ! $ENV{RELEASE_TESTING} )
-  ;
+      or
+    __PACKAGE__->is_ci
+  );
 }
 
 sub is_ci {
@@ -225,7 +225,15 @@ sub is_ci {
 }
 
 sub is_plain {
-  return (! __PACKAGE__->is_smoker && ! __PACKAGE__->is_author && ! $ENV{RELEASE_TESTING} )
+  return (
+    ! $ENV{RELEASE_TESTING}
+      and
+    ! $ENV{DBICTEST_RUN_ALL_TESTS}
+      and
+    ! __PACKAGE__->is_smoker
+      and
+    ! __PACKAGE__->is_author
+  )
 }
 
 # Try to determine the root of a checkout/untar if possible
diff --git a/t/storage/txn_scope_guard.t b/t/storage/txn_scope_guard.t
index d7e4cd0..1b405bd 100644
--- a/t/storage/txn_scope_guard.t
+++ b/t/storage/txn_scope_guard.t
@@ -173,7 +173,7 @@ for my $post_poison (0,1) {
   local $TODO = 'Do not know how to deal with trapped exceptions occuring after guard instantiation...'
     if ( $post_poison and (
       # take no chances on installation
-      ( DBICTest::RunMode->is_plain and ($ENV{TRAVIS}||'') ne 'true' )
+      DBICTest::RunMode->is_plain
         or
       # this always fails
       ! $pre_poison