re: RuboCop - replace rocket style hashes

This commit is contained in:
Alexey Dubovskoy
2016-06-20 20:58:50 +01:00
parent 004f1437d8
commit 024b2d51d3
19 changed files with 99 additions and 108 deletions

View File

@@ -8,12 +8,11 @@ module ActionController
get :render_resource_with_errors
expected_errors_object = {
:errors =>
[
{ :source => { :pointer => '/data/attributes/name' }, :detail => 'cannot be nil' },
{ :source => { :pointer => '/data/attributes/name' }, :detail => 'must be longer' },
{ :source => { :pointer => '/data/attributes/id' }, :detail => 'must be a uuid' }
]
errors: [
{ source: { pointer: '/data/attributes/name' }, detail: 'cannot be nil' },
{ source: { pointer: '/data/attributes/name' }, detail: 'must be longer' },
{ source: { pointer: '/data/attributes/id' }, detail: 'must be a uuid' }
]
}.to_json
assert_equal json_reponse_body.to_json, expected_errors_object
end

View File

@@ -87,7 +87,7 @@ module ActionController
setup do
@routes = Rails.application.routes.draw do
ActiveSupport::Deprecation.silence do
match ':action', :to => LinkedTestController, via: [:get, :post]
match ':action', to: LinkedTestController, via: [:get, :post]
end
end
end