class CukeLinter::TestWithBadNameLinter
A linter that detects scenarios and outlines that have a bad name
Public Instance Methods
message()
click to toggle source
The message used to describe the problem that has been found
# File lib/cuke_linter/linters/test_with_bad_name_linter.rb, line 19 def message '"Test", "Verify" and "Check" should not be used in scenario names.' end
rule(model)
click to toggle source
The rule used to determine if a model has a problem
# File lib/cuke_linter/linters/test_with_bad_name_linter.rb, line 8 def rule(model) return false unless model.is_a?(CukeModeler::Scenario) || model.is_a?(CukeModeler::Outline) lowercase_name = model.name.downcase lowercase_name.include?('test') || lowercase_name.include?('verif') || lowercase_name.include?('check') end