You need to sign in or sign up before continuing.
Refactor TestCase instantiation
Summary
In !27243 (merged) we started to skip rubocop
when instantiating a new TestCase
object.
According to our codebase we should not pass more than 9 arguments to a method
.
Improvements
We should pass a hash
when creating a new TestCase
object.
This refactoring will make sure the codebase of GitLab is consistent and does not allow more exception to this rule.
def initialize(params)
@name = params.fetch(:name)
@file = params.fetch[:file]
end
Risks
This could lead us to refactor a few places where we instantiate a TestCase
object.
Involved components
Edited by Max Orefice