Add and apply Style/HashTransformValues rule
The `transform_values` method is available since Ruby 2.5.
This commit is contained in:
@@ -475,6 +475,9 @@ Style/HashConversion:
|
|||||||
Style/HashSyntax:
|
Style/HashSyntax:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
|
||||||
|
Style/HashTransformValues:
|
||||||
|
Enabled: true
|
||||||
|
|
||||||
Style/IdenticalConditionalBranches:
|
Style/IdenticalConditionalBranches:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
shared_examples "remotely_translatable" do |factory_name, path_name, path_arguments|
|
shared_examples "remotely_translatable" do |factory_name, path_name, path_arguments|
|
||||||
let(:arguments) do
|
let(:arguments) do
|
||||||
path_arguments.map do |argument_name, path_to_value|
|
path_arguments.transform_values { |path_to_value| resource.send(path_to_value) }
|
||||||
[argument_name, resource.send(path_to_value)]
|
|
||||||
end.to_h
|
|
||||||
end
|
end
|
||||||
let(:path) { send(path_name, arguments) }
|
let(:path) { send(path_name, arguments) }
|
||||||
let!(:resource) { create(factory_name) }
|
let!(:resource) { create(factory_name) }
|
||||||
|
|||||||
Reference in New Issue
Block a user