Sha256: 3654e387e76046494ccf8ed09ae1876b54abeccef6f3342c8950a5400c10d84b
Contents?: true
Size: 1011 Bytes
Versions: 7
Compression:
Stored size: 1011 Bytes
Contents
require File.dirname(__FILE__) + '/../test_helper' class ProcessorTest < Test::Unit::TestCase context "a processor" do setup do @server = stub('Server') @settings = { 'workers' => { 'initial' => 1 } } @waiting_queue = stub('Queue(waiting)') @error_queue = stub('Queue(error)') @done_queue = stub('Queue(done)') provider = stub('QueueProvider') if defined?(Typica) Typica::Sqs::QueueService.stubs(:new).returns(provider) else RightAws::SqsGen2.stubs(:new).returns(provider) end provider.stubs(:queue).with('sample_waiting').returns(@waiting_queue) provider.stubs(:queue).with('sample_error').returns(@error_queue) provider.stubs(:queue).with('sample_done').returns(@done_queue) end should "initialize" do assert_nothing_raised do @waiting_queue.stubs(:receive) Refinery::Processor.new(@server, 'sample', @settings) end end end end
Version data entries
7 entries across 7 versions & 2 rubygems