fix test on cursor

This commit is contained in:
Cyril Mougel 2009-10-23 23:30:30 +02:00
parent 0f0c0e569d
commit bffc59ffb4
1 changed files with 1 additions and 1 deletions

View File

@ -103,7 +103,7 @@ class TestCursor < Test::Unit::TestCase
should "when an array should return a hash with each key" do should "when an array should return a hash with each key" do
@cursor = Cursor.new(@collection, :fields => [:name, :age]) @cursor = Cursor.new(@collection, :fields => [:name, :age])
result = @cursor.fields 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} assert result.values.all? {|v| v == 1}
end end