re: RuboCop - replace rocket style hashes

This commit is contained in:
Alexey Dubovskoy
2016-06-21 09:34:52 +01:00
parent 26aa06284f
commit 800221ed90
7 changed files with 22 additions and 22 deletions

View File

@@ -54,7 +54,7 @@ module ActiveModel
adapter: :json_api
).serializable_hash
expected = {
"comments-count": @post.comments.count
:"comments-count" => @post.comments.count
}
assert_equal(expected, hash[:data][:meta])
end
@@ -69,8 +69,8 @@ module ActiveModel
).serializable_hash
expected = {
data: [
{ id: '1337', type: 'posts', meta: { "comments-count": 0 } },
{ id: '1339', type: 'posts', meta: { "comments-count": 1 } }
{ id: '1337', type: 'posts', meta: { :"comments-count" => 0 } },
{ id: '1339', type: 'posts', meta: { :"comments-count" => 1 } }
]
}
assert_equal(expected, hash)