test/test_sideband.rb in sideband-1.0.1 vs test/test_sideband.rb in sideband-1.0.2
- old
+ new
@@ -1,17 +1,22 @@
require 'helper'
class TestSideband < MiniTest::Unit::TestCase
- def test_must_be_initialized_before_use
- assert_raises Sideband::NotInitializedError do
- Sideband.queue << -> { 'work' }
- end
+ def test_autoinitialization
+ assert Sideband.queue << -> { 'work' }
end
def test_has_queue
Sideband.initialize! do
assert_kind_of Sideband::Queue, Sideband.queue
+ end
+ end
+
+ def test_can_access_queue_or_send_jobs
+ Sideband.initialize! do
+ assert Sideband.queue(-> { 'work' })
+ assert Sideband.enqueue(-> { 'work' })
end
end
def test_manager_stored_in_thread_current
Sideband.initialize! do