<commit_before>require 'bundler/setup'

if ENV['COVERAGE'] == 'true' && RUBY_ENGINE == "ruby"
  require 'simplecov'
  SimpleCov.start do
    add_filter '/spec/'
  end
end

require 'telecine'
require 'celluloid/rspec'

Celluloid::Actor[:default_event_reporter].terminate if Celluloid::Actor[:default_event_reporter]
Celluloid::Actor[:default_incident_reporter].terminate if Celluloid::Actor[:default_incident_reporter]

Dir['./spec/support/*.rb'].map {|f| require f }

RSpec.configure do |config|
  config.filter_run :focus => true
  config.run_all_when_everything_filtered = true
end
<commit_msg>terminate actors created during tests<commit_after>require 'bundler/setup'

if ENV['COVERAGE'] == 'true' && RUBY_ENGINE == "ruby"
  require 'simplecov'
  SimpleCov.start do
    add_filter '/spec/'
  end
end

require 'telecine'
require 'celluloid/rspec'

Celluloid::Actor[:default_event_reporter].terminate if Celluloid::Actor[:default_event_reporter]
Celluloid::Actor[:default_incident_reporter].terminate if Celluloid::Actor[:default_incident_reporter]

Dir['./spec/support/*.rb'].map {|f| require f }

RSpec.configure do |config|
  config.filter_run :focus => true
  config.run_all_when_everything_filtered = true

  # terminate actors created during tests
  config.before(:each) do
    @running_actors = Celluloid::Actor.all
  end

  config.after(:each) do
    new_actors = Celluloid::Actor.all - @running_actors
    new_actors.each(&:terminate)
  end
end

{'fraction_non_alphanumeric': 0.12439862542955327, 'fraction_numerical': 0.0, 'mean_word_length': 5.803738317757009, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '6395328', 'n_tokens_mistral': 513, 'n_tokens_neox': 493, 'n_words': 97}