Made db.full_coll_name public. Wrote a test for it.

This commit is contained in:
Jim Menard 2008-12-02 07:26:45 -05:00
parent 8b82d716dd
commit 99db98f6e8
2 changed files with 6 additions and 2 deletions

View File

@ -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)

View File

@ -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