Sha256: 7e12d61a780d9470ce476fe1521a1014e70d9136ff9e2aa0a465639b59531316
Contents?: true
Size: 788 Bytes
Versions: 1
Compression:
Stored size: 788 Bytes
Contents
require 'test_helper' class LocaljobTest < LocaljobTestCase def setup @localjob = queue end def test_push_should_put_a_job_in_queue @localjob << WalrusJob.new("move") assert_equal 1, @localjob.size end def test_pop_from_queue @localjob << WalrusJob.new("move") job = @localjob.shift assert_instance_of WalrusJob, job assert_equal "move", job.action end def test_throws_error_if_message_is_too_large assert_raises Errno::EMSGSIZE do @localjob << AngryWalrusJob.new("f" * @localjob.queue.msgsize) end end def test_handles_multiple_queues @localjob << WalrusJob.new("move") other = queue("other-queue") other << WalrusJob.new("dance") assert_equal 1, @localjob.size assert_equal 1, other.size end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
localjob-0.0.1 | test/localjob_test.rb |