<commit_before>require 'minitest/autorun'
require 'rtest/test'

module Rtest
  class MetaTest < Minitest::Test
    def test_runnable_methods
      klass = Class.new(Test) {
        def test_foo; end
        def spec_foo; end
      }

      assert_equal Test::PREFIX, /^test_/
      assert_includes klass.runnable_methods, "test_foo"
    end

    def test_run_handles_assertions
      k = Class.new(Test) {
        def test_even_eh
          assert 2.even?
        end
      }.new

      k.run "test_even_eh"
      assert_equal 1, k.assertions
    end

    def test_run_handles_failures
      k = Class.new(Test) {
        def test_fail_even_eh
          assert 1.even?
        end
      }.new

      k.run "test_fail_even_eh"

      exp_error = Rtest::Assertion
      exp_msg   = "Failed assertion, no message given."

      assert exp_error === k.failures.first
      assert_equal exp_msg, k.failures.first.message
    end

    def test_run_passes_through_errors
      k = Class.new(Test) {
        def test_even_eh
          assert 2.even?
        end
      }.new

      assert_raises NoMethodError do
        k.run "test_odd_eh"
      end
    end

    def test_run_runs_all_tests
      k = Class.new(Test) {
        def test_even_eh
          assert 2.even?
        end

        def test_includes_eh
          assert [1, 2].include?(2)
        end
      }.new

      k.run
      assert_equal 2, k.assertions
    end
  end
end
<commit_msg>so meta, wow<commit_after>require 'minitest/autorun'
require 'rtest/test'

module Rtest
  class MetaMeta < Minitest::Test
    def test_runnable_methods
      klass = Class.new(Test) {
        def test_foo; end
        def spec_foo; end
      }

      assert_equal Test::PREFIX, /^test_/
      assert_includes klass.runnable_methods, "test_foo"
    end

    def test_run_handles_assertions
      k = Class.new(Test) {
        def test_even_eh
          assert 2.even?
        end
      }.new

      k.run "test_even_eh"
      assert_equal 1, k.assertions
    end

    def test_run_handles_failures
      k = Class.new(Test) {
        def test_fail_even_eh
          assert 1.even?
        end
      }.new

      k.run "test_fail_even_eh"

      exp_error = Rtest::Assertion
      exp_msg   = "Failed assertion, no message given."

      assert exp_error === k.failures.first
      assert_equal exp_msg, k.failures.first.message
    end

    def test_run_passes_through_errors
      k = Class.new(Test) {
        def test_even_eh
          assert 2.even?
        end
      }.new

      assert_raises NoMethodError do
        k.run "test_odd_eh"
      end
    end

    def test_run_runs_all_tests
      k = Class.new(Test) {
        def test_even_eh
          assert 2.even?
        end

        def test_includes_eh
          assert [1, 2].include?(2)
        end
      }.new

      k.run
      assert_equal 2, k.assertions
    end
  end
end

{'fraction_non_alphanumeric': 0.07254425546685178, 'fraction_numerical': 0.006247830614370011, 'mean_word_length': 1.8394088669950739, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, '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': '2452031', 'n_tokens_mistral': 1003, 'n_tokens_neox': 957, 'n_words': 220}