class RuboCop::Cop::Minitest::UselessAssertion
def offense?(node)
def offense?(node) expected, actual, = node.arguments case node.method_name when *SINGLE_ASSERTION_ARGUMENT_METHODS actual.nil? && expected&.literal? && !expected.xstr_type? when *TWO_ASSERTION_ARGUMENTS_METHODS return false unless expected && actual return false if expected.source != actual.source (expected.variable? && actual.variable?) || (empty_composite?(expected) && empty_composite?(actual)) when :assert_includes, :refute_includes expected && empty_composite?(expected) when :assert_silent block_node = node.parent block_node&.body.nil? else false end end