summaryrefslogtreecommitdiff
path: root/t/test-custodian-queue.rb
blob: d9145c82377ea17d9915837d6b242b60b42b454b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#!/usr/bin/ruby -I./lib/ -I../lib/


require 'test/unit'
require 'custodian/queue'




#
# Unit test for our queue-factory.
#
class TestCustodianQueue < Test::Unit::TestCase




  #
  # Create the test suite environment: NOP.
  #
  def setup
  end




  #
  # Destroy the test suite environment: NOP.
  #
  def teardown
  end


  #
  #  Test we can create and use a Redis queue.
  #
  def test_redis
    q = nil
    assert_nothing_raised do
      q = Custodian::RedisQueueType.new()
    end

    #
    # here we're testing we've got a derived class that has
    # implemented the methods "size?" & "flush!"
    #
    assert_nothing_raised do
      q.size?
      q.flush!
    end

  end


end