Sha256: 4178c84c3ce08ad54bc78201236d05bb6920420e4a4cd381d1ae08c4898ff779

Contents?: true

Size: 347 Bytes

Versions: 3

Compression:

Stored size: 347 Bytes

Contents

require 'helper'

class TestQueue < MiniTest::Unit::TestCase

  def setup
    @queue = Sideband::Queue.new
  end

  def test_killed
    @queue.kill
    assert_nil @queue.pop
  end

  def test_can_push_and_pop
    assert_equal true, @queue.push(:a)
    assert_equal :a,   @queue.pop
  end

  def test_nil_blocked
    refute @queue << nil
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
sideband-1.0.2 test/test_queue.rb
sideband-1.0.1 test/test_queue.rb
sideband-1.0.0 test/test_queue.rb