re: RuboCop - get rid of redundant curly braces around a hash parameter

This commit is contained in:
Alexey Dubovskoy
2016-06-20 21:00:06 +01:00
parent 024b2d51d3
commit 13015680a7
12 changed files with 32 additions and 53 deletions

View File

@@ -17,7 +17,7 @@ module ActiveModelSerializers
@first_post = Post.new(id: 10, title: 'Hello!!', body: 'Hello, world!!')
@second_post = Post.new(id: 20, title: 'New Post', body: 'Body')
@third_post = Post.new(id: 30, title: 'Yet Another Post', body: 'Body')
@blog = Blog.new({ name: 'AMS Blog' })
@blog = Blog.new(name: 'AMS Blog')
@first_comment = Comment.new(id: 1, body: 'ZOMG A COMMENT')
@second_comment = Comment.new(id: 2, body: 'ZOMG ANOTHER COMMENT')
@first_post.blog = @blog

View File

@@ -13,11 +13,11 @@ module ActiveModelSerializers
def setup
ActionController::Base.cache_store.clear
@array = [
Profile.new({ id: 1, name: 'Name 1', description: 'Description 1', comments: 'Comments 1' }),
Profile.new({ id: 2, name: 'Name 2', description: 'Description 2', comments: 'Comments 2' }),
Profile.new({ id: 3, name: 'Name 3', description: 'Description 3', comments: 'Comments 3' }),
Profile.new({ id: 4, name: 'Name 4', description: 'Description 4', comments: 'Comments 4' }),
Profile.new({ id: 5, name: 'Name 5', description: 'Description 5', comments: 'Comments 5' })
Profile.new(id: 1, name: 'Name 1', description: 'Description 1', comments: 'Comments 1'),
Profile.new(id: 2, name: 'Name 2', description: 'Description 2', comments: 'Comments 2'),
Profile.new(id: 3, name: 'Name 3', description: 'Description 3', comments: 'Comments 3'),
Profile.new(id: 4, name: 'Name 4', description: 'Description 4', comments: 'Comments 4'),
Profile.new(id: 5, name: 'Name 5', description: 'Description 5', comments: 'Comments 5')
]
end
@@ -122,7 +122,7 @@ module ActiveModelSerializers
end
def test_pagination_links_with_additional_params
adapter = load_adapter(using_will_paginate, mock_request({ test: 'test' }))
adapter = load_adapter(using_will_paginate, mock_request(test: 'test'))
assert_equal expected_response_with_pagination_links_and_additional_params,
adapter.serializable_hash