Sets are not ordered, do not depend on the order

This commit is contained in:
José Valim 2012-07-21 09:48:12 +02:00
parent ef7d475912
commit e886f597c7

View File

@ -444,10 +444,10 @@ class SerializerTest < ActiveModel::TestCase
serializer = set.active_model_serializer.new set, :each_serializer => CustomPostSerializer
assert_equal([
{ :title => "Post1" },
{ :title => "Post2" }
], serializer.as_json)
as_json = serializer.as_json
assert_equal 2, as_json.size
assert_include(as_json, { :title => "Post1" })
assert_include(as_json, { :title => "Post2" })
end
class CustomBlog < Blog