diff options
| author | Patrick J Cherry <patrick@bytemark.co.uk> | 2016-02-10 10:45:07 +0000 | 
|---|---|---|
| committer | Patrick J Cherry <patrick@bytemark.co.uk> | 2016-02-10 10:45:07 +0000 | 
| commit | 3cfb74235885faa268e4984962e36f7254478104 (patch) | |
| tree | cbd2fb55e2781ed718b65c474c2ba49cc0201fa6 | |
| parent | 62fc56d4bc7a7e85828520eb7c586cfe0cedd2fc (diff) | |
Updated tests to use 'omit' when available
The redis and rubocop tests now skip on ruby > 2.0 (I think)
| -rwxr-xr-x | t/test-custodian-queue.rb | 8 | ||||
| -rwxr-xr-x | t/test-rubocop.rb | 6 | 
2 files changed, 13 insertions, 1 deletions
| diff --git a/t/test-custodian-queue.rb b/t/test-custodian-queue.rb index d9145c8..c25fc24 100755 --- a/t/test-custodian-queue.rb +++ b/t/test-custodian-queue.rb @@ -19,6 +19,13 @@ class TestCustodianQueue < Test::Unit::TestCase    # Create the test suite environment: NOP.    #    def setup +    unless defined? ::Redis +      if methods.include? :skip +        skip("Redis library missing -- skipping tests") +      else +        omit("Redis library missing -- skipping tests") +      end +    end    end @@ -35,6 +42,7 @@ class TestCustodianQueue < Test::Unit::TestCase    #  Test we can create and use a Redis queue.    #    def test_redis +      q = nil      assert_nothing_raised do        q = Custodian::RedisQueueType.new() diff --git a/t/test-rubocop.rb b/t/test-rubocop.rb index f4a7612..57457b7 100755 --- a/t/test-rubocop.rb +++ b/t/test-rubocop.rb @@ -23,7 +23,11 @@ class TestRubocop < Test::Unit::TestCase        assert(result == 0, 'No errors found')      rescue LoadError => ex -      skip("Failed to load 'rubocop' gem - skipping") +      if methods.include?(:skip) +        skip("Failed to load 'rubocop' gem - skipping") +      else +        omit("Failed to load 'rubocop' gem - skipping") +      end      end    end | 
