Sha256: e1e82aa6ce4f40b80cb1c331e98573cb6548d4ad32f5ab59e5fa68d672e9ff2c

Contents?: true

Size: 738 Bytes

Versions: 7

Compression:

Stored size: 738 Bytes

Contents

require File.dirname(__FILE__) + '/../test_helper'

class QueueMe
  include Refinery::Configurable
  include Refinery::Queueable
end

class QueueableTest < Test::Unit::TestCase
  context "a class with the Queuable module" do
    should "provide a queue" do
      setup_default_config
      
      queue = stub('queue')
      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
end

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
aeden-refinery-0.10.10 test/unit/queueable_test.rb
refinery-0.12.1 test/unit/queueable_test.rb
refinery-0.12.0 test/unit/queueable_test.rb
refinery-0.11.0 test/unit/queueable_test.rb
refinery-0.10.11 test/unit/queueable_test.rb
refinery-0.10.10 test/unit/queueable_test.rb
refinery-0.10.9 test/unit/queueable_test.rb