minor: fixes for tests in Ruby 1.8.7
This commit is contained in:
parent
4db19610d6
commit
c802c7eba3
|
@ -1,6 +1,6 @@
|
|||
require File.join(File.dirname(__FILE__), '..', '..', 'lib', 'bson')
|
||||
require 'rubygems' if RUBY_VERSION < '1.9.0' && ENV['C_EXT']
|
||||
gem 'test-unit' if RUBY_VERSION > '1.9.0'
|
||||
require 'rubygems' if RUBY_VERSION < '1.9.0'
|
||||
gem 'test-unit'
|
||||
require 'test/unit'
|
||||
|
||||
def silently
|
||||
|
|
|
@ -89,7 +89,16 @@ class BasicTest < Test::Unit::TestCase
|
|||
rescue SystemStackError
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
context "checking out readers" do
|
||||
setup do
|
||||
seeds = build_seeds(3)
|
||||
args = {:name => @rs.name}
|
||||
@con = ReplSetConnection.new(seeds, args)
|
||||
@coll = @con[MONGO_TEST_DB]['test-connection-exceptions']
|
||||
end
|
||||
|
||||
should "close the connection on receive_message for major exceptions" do
|
||||
@con.expects(:checkout_reader).raises(SystemStackError)
|
||||
@con.expects(:close)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
$:.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
||||
require 'rubygems' if RUBY_VERSION < '1.9.0' && ENV['C_EXT']
|
||||
require 'rubygems' if RUBY_VERSION
|
||||
require 'mongo'
|
||||
gem 'test-unit' if RUBY_VERSION > '1.9.0'
|
||||
gem 'test-unit'
|
||||
require 'test/unit'
|
||||
|
||||
def silently
|
||||
|
|
Loading…
Reference in New Issue