Sha256: 39adaef35be200d6d125eeb0a2e0e913efe03905975707324b5329d19ea6917f

Contents?: true

Size: 513 Bytes

Versions: 3

Compression:

Stored size: 513 Bytes

Contents

require 'helper'

class TestWorker < MiniTest::Unit::TestCase

  def test_can_queue_itself
    Sideband.initialize! do
      assert Sideband::Worker.new.enqueue
      assert Sideband::Worker.new.queue
      assert EmailWorker.new.enqueue
      assert EmailWorker.new.queue
    end
  end

  def test_raises_error_if_call_not_implemented
    assert_raises NotImplementedError do
      Sideband::Worker.new.call
    end
  end

  def test_call_implemented
    assert_equal 'finished', EmailWorker.new.call
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

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