[DRE-commits] [gem2deb] 03/05: Gem2deb.testing: tell me if we are running tests

Antonio Terceiro terceiro at moszumanska.debian.org
Sat Feb 21 22:33:48 UTC 2015


This is an automated email from the git hooks/post-receive script.

terceiro pushed a commit to branch master
in repository gem2deb.

commit ced755e2ffd06a56f9b6280f3998be6392ac6257
Author: Antonio Terceiro <terceiro at debian.org>
Date:   Sat Feb 21 20:28:20 2015 -0200

    Gem2deb.testing: tell me if we are running tests
    
    Use it to avoid expensive/manual operations when running tests
---
 lib/gem2deb.rb      | 6 ++++++
 test/test_helper.rb | 1 +
 2 files changed, 7 insertions(+)

diff --git a/lib/gem2deb.rb b/lib/gem2deb.rb
index 12f84a6..7a5e26d 100644
--- a/lib/gem2deb.rb
+++ b/lib/gem2deb.rb
@@ -23,6 +23,12 @@ module Gem2Deb
 
   class << self
     attr_accessor :verbose
+    def testing
+      ENV['GEM2DEB_TESTING']
+    end
+    def testing=(v)
+      ENV['GEM2DEB_TESTING'] = v.to_s
+    end
   end
 
   class CommandFailed < Exception
diff --git a/test/test_helper.rb b/test/test_helper.rb
index 84b0419..438de02 100644
--- a/test/test_helper.rb
+++ b/test/test_helper.rb
@@ -12,6 +12,7 @@ require 'tempfile'
 
 require 'gem2deb'
 Gem2Deb.verbose = false
+Gem2Deb.testing = true
 
 Gem2DebTestCase = Test::Unit::TestCase
 class Gem2DebTestCase

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/gem2deb.git



More information about the Pkg-ruby-extras-commits mailing list