test/unit/queueable_test.rb in refinery-0.10.8 vs test/unit/queueable_test.rb in refinery-0.10.9

- old
+ new

@@ -9,14 +9,16 @@ context "a class with the Queuable module" do should "provide a queue" do setup_default_config queue = stub('queue') - queue_provider = stub('queue provider') - queue_provider.expects(:queue).with('a_queue').returns(queue) - RightAws::SqsGen2.expects(:new).with( - 'aki', 'sak', {:multi_thread => true} - ).returns(queue_provider) + provider = stub('queue provider') + provider.expects(:queue).with('a_queue').returns(queue) + if defined?(Typica) + Typica::Sqs::QueueService.expects(:new).returns(provider) + else + RightAws::SqsGen2.expects(:new).with('aki', 'sak', {:multi_thread => true}).returns(provider) + end queueable = QueueMe.new assert_not_nil queueable.queue('a_queue') end end \ No newline at end of file