summaryrefslogtreecommitdiff
path: root/t/test-custodian-queue.rb
diff options
context:
space:
mode:
authorPatrick J Cherry <patrick@bytemark.co.uk>2016-02-10 10:45:07 +0000
committerPatrick J Cherry <patrick@bytemark.co.uk>2016-02-10 10:45:07 +0000
commit3cfb74235885faa268e4984962e36f7254478104 (patch)
treecbd2fb55e2781ed718b65c474c2ba49cc0201fa6 /t/test-custodian-queue.rb
parent62fc56d4bc7a7e85828520eb7c586cfe0cedd2fc (diff)
Updated tests to use 'omit' when available
The redis and rubocop tests now skip on ruby > 2.0 (I think)
Diffstat (limited to 't/test-custodian-queue.rb')
-rwxr-xr-xt/test-custodian-queue.rb8
1 files changed, 8 insertions, 0 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()