<commit_before>require 'test/unit'

MYDIR = File.dirname(__FILE__)

$:.unshift 'lib'
require 'coderay'
puts "Running basic CodeRay #{CodeRay::VERSION} tests..."

suite = %w(basic examples load_plugin_scanner word_list)
for test_case in suite
  load File.join(MYDIR, test_case + '.rb')
end<commit_msg>Cleaning up functional tests: Automatically load all files in the folder.<commit_after>require 'test/unit'
$:.unshift 'lib'
require 'coderay'

MYDIR = File.dirname(__FILE__)
suite = Dir[File.join(MYDIR, '*.rb')].
  map { |tc| File.basename(tc).sub(/\.rb$/, '') } - %w'suite for_redcloth'

puts "Running basic CodeRay #{CodeRay::VERSION} tests: #{suite.join(', ')}"

for test_case in suite
  load File.join(MYDIR, test_case + '.rb')
end
{'fraction_non_alphanumeric': 0.15918367346938775, 'fraction_numerical': 0.0, 'mean_word_length': 5.2905982905982905, 'pattern_counts': {'":': 0, '<': 3, '<?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': '739457', 'n_tokens_mistral': 260, 'n_tokens_neox': 259, 'n_words': 69}