diff --git a/.rubocop.yml b/.rubocop.yml index e842f0b7d..b61c60d86 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -62,6 +62,10 @@ Metrics/PerceivedComplexity: Minitest/MultipleAssertions: Enabled: false +# FIXME: DavyJonesLocker/client_side_validations#927 +Minitest/NonExecutableTestMethod: + Enabled: false + Rails/ApplicationRecord: Exclude: - 'test/**/*' diff --git a/lib/client_side_validations/extender.rb b/lib/client_side_validations/extender.rb index e826e0c24..91f0c91d8 100644 --- a/lib/client_side_validations/extender.rb +++ b/lib/client_side_validations/extender.rb @@ -7,7 +7,7 @@ module Extender def extend(klass, validators) validators.each do |validator| require "client_side_validations/#{klass.underscore}/#{validator.downcase}" - const_get(klass)::Validations.const_get("#{validator}Validator").send :include, ClientSideValidations.const_get(klass).const_get(validator) + const_get(klass)::Validations.const_get(:"#{validator}Validator").send :include, ClientSideValidations.const_get(klass).const_get(validator) end end end diff --git a/test/action_view/models/category.rb b/test/action_view/models/category.rb index ada142b59..a4cb434bf 100644 --- a/test/action_view/models/category.rb +++ b/test/action_view/models/category.rb @@ -12,7 +12,7 @@ class Category def initialize(params = {}) params.each do |attr, value| - public_send("#{attr}=", value) + public_send(:"#{attr}=", value) end end diff --git a/test/action_view/models/comment.rb b/test/action_view/models/comment.rb index 3db34d068..aeca8d630 100644 --- a/test/action_view/models/comment.rb +++ b/test/action_view/models/comment.rb @@ -12,7 +12,7 @@ class Comment def initialize(params = {}) params.each do |attr, value| - public_send("#{attr}=", value) + public_send(:"#{attr}=", value) end end diff --git a/test/action_view/models/format_thing.rb b/test/action_view/models/format_thing.rb index aa543c93b..b1f487182 100644 --- a/test/action_view/models/format_thing.rb +++ b/test/action_view/models/format_thing.rb @@ -35,7 +35,7 @@ class FormatThing def initialize(params = {}) params.each do |attr, value| - public_send("#{attr}=", value) + public_send(:"#{attr}=", value) end end diff --git a/test/action_view/models/post.rb b/test/action_view/models/post.rb index 705b1764a..7c2c18483 100644 --- a/test/action_view/models/post.rb +++ b/test/action_view/models/post.rb @@ -17,7 +17,7 @@ class Post def initialize(params = {}) params.each do |attr, value| - public_send("#{attr}=", value) + public_send(:"#{attr}=", value) end end diff --git a/test/action_view/models/tag.rb b/test/action_view/models/tag.rb index ed20aa88e..c16b950b1 100644 --- a/test/action_view/models/tag.rb +++ b/test/action_view/models/tag.rb @@ -10,7 +10,7 @@ class Tag def initialize(params = {}) params.each do |attr, value| - public_send("#{attr}=", value) + public_send(:"#{attr}=", value) end end