Rubocop should not correct put arguments in functional tests:
put :update, my: 'params'
Hash parameter is passed as keyword argument using :params key
put :update, params: { my: 'params' }
Describe here what actually happened.
Create rails functional test:
should 'should not correct' do
get :show, { id: 1 }
end
linter will spot a problem:
Use keyword arguments instead of positional arguments for http call
$ rubocop -V
0.44.1 (using Parser 2.3.1.4, running on ruby 2.2.4 x86_64-darwin15)
I'm guessing you're using Rails 4?
yes,
disabling Rails/HttpPositionalArguments works, is there better solution?
@lemingos: This cop only applies to Rails 5. We're discussing how to approach this in #3629. Disabling it is the right solution for now. 馃榾
OK thanks.
Most helpful comment
yes,
disabling Rails/HttpPositionalArguments works, is there better solution?