<commit_before>require_relative 'test_case'
require 'minitest/fail'

module Minitest
  class FailTest < TestCase
    def test_fail_eh
      fail_off!
      refute Fail.fail?
    end

    def test_fail_bang
      activate_fail!
      assert Fail.fail?
    ensure
      fail_off!
    end
  end

  class FailIntegrationTest < TestCase
    def test_integration_represent_empty_tests_as_failures
      activate_fail!

      reporter.start
      reporter.record example_test.new(:test_empty).run
      reporter.report

      exp_error = %r(Empty test #<Class:(.*)>#test_empty)

      assert_match exp_error, io.string
    ensure
      fail_off!
    end

    def test_integration_fail_needs_to_be_activated
      fail_off!

      reporter.start
      reporter.record example_test.new(:test_empty).run
      reporter.report

      exp_error = %r(Empty test, #<Class:(.*)>#test_empty)

      refute_match exp_error, io.string
    end
  end
end
<commit_msg>Remove unneeded ensures<commit_after>require_relative 'test_case'
require 'minitest/fail'

module Minitest
  class FailTest < TestCase
    def test_fail_eh
      fail_off!
      refute Fail.fail?
    end

    def test_fail_bang
      activate_fail!
      assert Fail.fail?
    end
  end

  class FailIntegrationTest < TestCase
    def test_integration_represent_empty_tests_as_failures
      activate_fail!

      reporter.start
      reporter.record example_test.new(:test_empty).run
      reporter.report

      exp_error = %r(Empty test #<Class:(.*)>#test_empty)

      assert_match exp_error, io.string
    end

    def test_integration_fail_needs_to_be_activated
      fail_off!

      reporter.start
      reporter.record example_test.new(:test_empty).run
      reporter.report

      exp_error = %r(Empty test, #<Class:(.*)>#test_empty)

      refute_match exp_error, io.string
    end
  end
end

{'fraction_non_alphanumeric': 0.07135135135135136, 'fraction_numerical': 0.0, 'mean_word_length': 2.896842105263158, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5688390', 'n_tokens_mistral': 621, 'n_tokens_neox': 607, 'n_words': 120}