Module sync 1d81b6a
[puppet-modules/puppetlabs-apt.git] / spec / spec_helper_acceptance.rb
index e9d51bfd11c60c4d38b5861b29a9ffefd6a1169f..67bf096d830ae1c1b6449edf69773ca0a897772b 100644 (file)
@@ -69,19 +69,15 @@ def retry_on_error_matching(max_retry_count = 3, retry_wait_interval_secs = 5, e
   begin
     try += 1
     yield
-  rescue Exception => e
-    if try < max_retry_count && (error_matcher.nil? || e.message =~ error_matcher)
-      sleep retry_wait_interval_secs
-      retry
-    else
-      raise
-    end
+  rescue StandardError => e
+    raise unless try < max_retry_count && (error_matcher.nil? || e.message =~ error_matcher)
+    sleep retry_wait_interval_secs
+    retry
   end
 end
 
 RSpec.configure do |c|
-  # Project root
-  proj_root = File.expand_path(File.join(File.dirname(__FILE__), '..'))
+  File.expand_path(File.join(File.dirname(__FILE__), '..'))
 
   # Readable test descriptions
   c.formatter = :documentation