Sha256: 04ff58bcc1a0497be5a7e586ca11fb28a37a214726892a937f50dbc2f325ca39

Contents?: true

Size: 920 Bytes

Versions: 6

Compression:

Stored size: 920 Bytes

Contents

require 'helper'

class TestGirlFriday < MiniTest::Unit::TestCase

  describe 'GirlFriday' do
    after do
      GirlFriday.shutdown!
    end

    describe '.status' do
      before do
        q1 = GirlFriday::Queue.new(:q1) do; end
        q2 = GirlFriday::Queue.new(:q2) do; end
      end
      it 'provides a status structure for each live queue' do
        hash = GirlFriday.status
        assert_kind_of Hash, hash
        assert_equal 2, GirlFriday.queues.size
        assert_equal 2, hash.size
      end
    end

    describe '.shutdown!' do
      before do
        q1 = GirlFriday::Queue.new(:q1) do; end
        q2 = GirlFriday::Queue.new(:q2) do; end
      end
      it 'provides a status structure for each live queue' do
        a = Time.now
        assert_equal 0, GirlFriday.shutdown!
        assert_in_delta 0, Time.now - a, 0.1
        assert_equal 0, GirlFriday.queues.size
      end
    end
  end

end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
girl_friday-0.11.1 test/test_girl_friday.rb
girl_friday-0.11.0 test/test_girl_friday.rb
girl_friday-0.10.0 test/test_girl_friday.rb
girl_friday-0.9.7 test/test_girl_friday.rb
girl_friday-0.9.6 test/test_girl_friday.rb
girl_friday-0.9.5 test/test_girl_friday.rb