Sha256: 0d1bac1e8d158e27270e7b879f7779b90767ded381a9981d8a9a84f9af91a6d2

Contents?: true

Size: 637 Bytes

Versions: 6

Compression:

Stored size: 637 Bytes

Contents

require 'test/test_helper'
include Mongo

class ConnectionTest < Test::Unit::TestCase
  context "Initialization: " do

    context "given async connection options" do

      should "default the workers pool to 1" do
        Async::WorkerPool.expects(:new).with(1)

        Connection.new('localhost', 27017)
      end

      should "override the workers pool size with the :worker_pool_size key" do
        size = 6
        Async::WorkerPool.expects(:new).with(size)

        Connection.new('localhost', 27017, :worker_pool_size => size)
      end
    end # context 'given async connection options'

  end # context 'Initialization'
end

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
vanity-1.7.1 vendor/ruby/1.9.1/gems/mongo-1.3.1/test/async/connection_test.rb
mongo-1.3.1 test/async/connection_test.rb
mongo-1.3.0 test/async/connection_test.rb
mongo-1.2.2 test/async/connection_test.rb
mongo-1.2.1 test/async/connection_test.rb
mongo-1.2.0 test/async/connection_test.rb