Skip to content

Files

Latest commit

 

History

History
25 lines (18 loc) · 431 Bytes

Minitest-NonExecutableTestMethod.md

File metadata and controls

25 lines (18 loc) · 431 Bytes

Pattern: Use of test method outside of test class

Issue: -

Description

Checks for the use of test methods outside of a test class.

Test methods should be defined within a test class to ensure their execution.

Examples

# bad
class FooTest < Minitest::Test
end
def test_method_should_be_inside_test_class
end

# good
class FooTest < Minitest::Test
  def test_method_should_be_inside_test_class
  end
end