RUBY-405 fixed map reduce test to work with 1.8.7 using ordered hash

This commit is contained in:
Tyler Brock 2012-01-30 16:57:05 -05:00
parent fb77743f60
commit 99d9dfddfb
1 changed files with 4 additions and 1 deletions

View File

@ -608,7 +608,10 @@ class TestCollection < Test::Unit::TestCase
m = Code.new("function() { emit(this.user_id, 1); }")
r = Code.new("function(k,vals) { return 1; }")
res = @@test.map_reduce(m, r, :out => {:replace => "foo", :db => 'somedb'})
oh = BSON::OrderedHash.new
oh[:replace] = 'foo'
oh[:db] = 'somedb'
res = @@test.map_reduce(m, r, :out => (oh))
assert res["result"]
assert res["counts"]
assert res["timeMillis"]