From 99d9dfddfb8aad15e7cc1756983ba12776ebc6bd Mon Sep 17 00:00:00 2001 From: Tyler Brock Date: Mon, 30 Jan 2012 16:57:05 -0500 Subject: [PATCH] RUBY-405 fixed map reduce test to work with 1.8.7 using ordered hash --- test/collection_test.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/collection_test.rb b/test/collection_test.rb index cefd32a..a2d211e 100644 --- a/test/collection_test.rb +++ b/test/collection_test.rb @@ -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"]