<commit_before>require 'fluent/test'
require 'fluent/plugin/out_dd'
require 'dogapi'
require 'time'

# Disable Test::Unit
module Test::Unit::RunCount; def run(*); end; end

class Fluent::DdOutput < Fluent::BufferedOutput
  private
  alias_method :orig_emit_points, :emit_points

  def emit_points(*args)
    if $threads_array_for_test
      $threads_array_for_test << Thread.current
    end
    orig_emit_points(*args)
  end
end

RSpec.configure do |config|
  config.before(:all) do
    Fluent::Test.setup
  end
end<commit_msg>Fix spec<commit_after>require 'fluent/test'
require 'fluent/plugin/out_dd'
require 'dogapi'
require 'time'

# Disable Test::Unit
module Test::Unit::RunCount; def run(*); end; end
Test::Unit.run = true if defined?(Test::Unit) && Test::Unit.respond_to?(:run=)

class Fluent::DdOutput < Fluent::BufferedOutput
  private
  alias_method :orig_emit_points, :emit_points

  def emit_points(*args)
    if $threads_array_for_test
      $threads_array_for_test << Thread.current
    end
    orig_emit_points(*args)
  end
end

RSpec.configure do |config|
  config.before(:all) do
    Fluent::Test.setup
  end
end
{'fraction_non_alphanumeric': 0.11613475177304965, 'fraction_numerical': 0.0, 'mean_word_length': 5.037433155080214, 'pattern_counts': {'":': 0, '<': 9, '<?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': '3667226', 'n_tokens_mistral': 394, 'n_tokens_neox': 392, 'n_words': 87}