Test method naming (ARCH6008)
Dieser Inhalt ist noch nicht in deiner Sprache verfügbar.
Key ruby.naming.test-name-convention · Severity info · Category naming
Test methods must follow the framework’s discovery convention or the runner will not execute them. In Minitest, test methods must begin with test_. Non-conforming names lead to silently skipped tests.
Incorrect
Section titled “Incorrect”class CartTest < Minitest::Test def checks_total assert_equal 30, Cart.new([10, 20]).total endendCorrect
Section titled “Correct”class CartTest < Minitest::Test def test_total assert_equal 30, Cart.new([10, 20]).total endendName test methods per the framework’s discovery convention (a test_ prefix in Minitest).