Skip to content
Snippets Groups Projects
Commit b987230d authored by Markus Reiter's avatar Markus Reiter
Browse files

RuboCop: Style/CaseEquality

parent 817bc274
No related branches found
No related tags found
No related merge requests found
......@@ -49,7 +49,7 @@ class CompilerFailure
instance_eval(&block) if block_given?
end
def ===(compiler)
def fails_with?(compiler)
name == compiler.name && version >= compiler.version
end
......@@ -127,7 +127,7 @@ class CompilerSelector
end
def fails_with?(compiler)
failures.any? { |failure| failure === compiler }
failures.any? { |failure| failure.fails_with?(compiler) }
end
def compiler_version(name)
......
......@@ -5,11 +5,11 @@ class CompilerFailureTests < Homebrew::TestCase
Compiler = Struct.new(:name, :version)
def assert_fails_with(compiler, failure)
assert_operator failure, :===, compiler
assert_operator failure, :fails_with?, compiler
end
def refute_fails_with(compiler, failure)
refute_operator failure, :===, compiler
refute_operator failure, :fails_with?, compiler
end
def compiler(name, version)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment