spec/public/to_json_spec.rb in dm-serializer-1.1.0 vs spec/public/to_json_spec.rb in dm-serializer-1.2.0.rc1
- old
+ new
@@ -11,11 +11,11 @@
query = DataMapper::Query.new(DataMapper::repository(:default), Cow)
keys = %w[ id composite name breed ]
resources = [
- keys.zip([ 1, 2, 'Betsy', 'Jersey' ]).to_hash,
- keys.zip([ 10, 20, 'Berta', 'Guernsey' ]).to_hash,
+ Hash[ keys.zip([ 1, 2, 'Betsy', 'Jersey' ]) ],
+ Hash[ keys.zip([ 10, 20, 'Berta', 'Guernsey' ]) ],
]
@collection = DataMapper::Collection.new(query, query.model.load(resources, query))
@harness = Class.new(SerializerTestHarness) do