minor: test updates for JRuby in 1.9 mode
This commit is contained in:
parent
e868f090a3
commit
dd02b12282
@ -16,10 +16,6 @@ class TestConnection < Test::Unit::TestCase
|
||||
@mongo[MONGO_TEST_DB].get_last_error
|
||||
end
|
||||
|
||||
def test_slave_ok_with_multiple_nodes
|
||||
|
||||
end
|
||||
|
||||
def test_server_info
|
||||
server_info = @mongo.server_info
|
||||
assert server_info.keys.include?("version")
|
||||
|
@ -739,7 +739,12 @@ class DBAPITest < Test::Unit::TestCase
|
||||
utf8 = "hello world".encode("UTF-8")
|
||||
iso8859 = "hello world".encode("ISO-8859-1")
|
||||
|
||||
assert_equal "US-ASCII", ascii.encoding.name
|
||||
if RUBY_PLATFORM =~ /jruby/
|
||||
assert_equal "ASCII-8BIT", ascii.encoding.name
|
||||
else
|
||||
assert_equal "US-ASCII", ascii.encoding.name
|
||||
end
|
||||
|
||||
assert_equal "UTF-8", utf8.encoding.name
|
||||
assert_equal "ISO-8859-1", iso8859.encoding.name
|
||||
|
||||
|
@ -19,7 +19,7 @@ MSG
|
||||
exit
|
||||
end
|
||||
|
||||
require 'bson_ext/cbson' if ENV['C_EXT']
|
||||
require 'bson_ext/cbson' if !(RUBY_PLATFORM =~ /java/) && ENV['C_EXT']
|
||||
|
||||
unless defined? MONGO_TEST_DB
|
||||
MONGO_TEST_DB = 'mongo-ruby-test'
|
||||
@ -47,7 +47,7 @@ class Test::Unit::TestCase
|
||||
end
|
||||
|
||||
def self.mongo_port
|
||||
ENV['MONGO_RUBY_DRIVER_PORT'].to_i || 27017
|
||||
ENV['MONGO_RUBY_DRIVER_PORT'] ? ENV['MONGO_RUBY_DRIVER_PORT'].to_i : 27017
|
||||
end
|
||||
|
||||
def host_port
|
||||
|
Loading…
Reference in New Issue
Block a user