From bffc59ffb4eb3995aa1cea68275060c682dd5df1 Mon Sep 17 00:00:00 2001 From: Cyril Mougel Date: Fri, 23 Oct 2009 23:30:30 +0200 Subject: [PATCH] fix test on cursor --- test/unit/cursor_test.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/unit/cursor_test.rb b/test/unit/cursor_test.rb index 69b994d..1fe011f 100644 --- a/test/unit/cursor_test.rb +++ b/test/unit/cursor_test.rb @@ -103,7 +103,7 @@ class TestCursor < Test::Unit::TestCase should "when an array should return a hash with each key" do @cursor = Cursor.new(@collection, :fields => [:name, :age]) result = @cursor.fields - assert_equal result.keys, [:age, :name] + assert_equal result.keys.sort{|a,b| a.to_s <=> b.to_s}, [:age, :name].sort{|a,b| a.to_s <=> b.to_s} assert result.values.all? {|v| v == 1} end