Skip to content

Files

Latest commit

 

History

History
25 lines (19 loc) · 349 Bytes

Minitest-AssertionInLifecycleHook.md

File metadata and controls

25 lines (19 loc) · 349 Bytes

Pattern: Use of assertion in lifecycle hook

Issue: -

Description

Checks for usage of assertions in lifecycle hooks.

Examples

# bad
class FooTest < Minitest::Test
  def setup
    assert_equal(foo, bar)
  end
end

# good
class FooTest < Minitest::Test
  def test_something
    assert_equal(foo, bar)
  end
end