class RuboCop::Cop::Minitest::SkipEnsure
def valid_conditional_skip?(skip_method, ensure_node)
def valid_conditional_skip?(skip_method, ensure_node) if_node = skip_method.ancestors.detect(&:if_type?) return false unless ensure_node.body.if_type? match_keyword = ensure_node.body.if? ? if_node.if? : if_node.unless? match_keyword && ensure_node.body.condition == if_node.condition end