Made db.full_coll_name public. Wrote a test for it.
This commit is contained in:
parent
8b82d716dd
commit
99db98f6e8
|
@ -160,12 +160,12 @@ module XGen
|
|||
@socket.print(message.buf.to_s)
|
||||
end
|
||||
|
||||
protected
|
||||
|
||||
def full_coll_name(collection)
|
||||
"#{@name}.#{collection}"
|
||||
end
|
||||
|
||||
protected
|
||||
|
||||
def db_command(selector)
|
||||
# TODO synchronize
|
||||
q = Query.new(selector)
|
||||
|
|
|
@ -76,4 +76,8 @@ class DBAPITest < Test::Unit::TestCase
|
|||
# Mongo bug: returns string with wrong length, so last byte of value is chopped off.
|
||||
# assert_equal @coll.name, row['options']['create']
|
||||
end
|
||||
|
||||
def test_full_coll_name
|
||||
assert_equal @coll_full_name, @db.full_coll_name(@coll.name)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue