<commit_before>require 'simplecov' unless RUBY_VERSION.to_s < '1.9.0'


require_relative '../lib/cuke_modeler'

require_relative 'unit/feature_element_unit_specs'
require_relative 'unit/nested_element_unit_specs'
require_relative 'unit/tagged_element_unit_specs'
require_relative 'unit/containing_element_unit_specs'
require_relative 'unit/bare_bones_unit_specs'
require_relative 'unit/test_element_unit_specs'
require_relative 'unit/prepopulated_unit_specs'
require_relative 'unit/sourced_element_unit_specs'
require_relative 'unit/raw_element_unit_specs'


RSpec.configure do |config|
  case
    when Gem.loaded_specs['gherkin'].version.version[/^4/]
      config.filter_run_excluding :gherkin2 => true,
                                  :gherkin3 => true
    when Gem.loaded_specs['gherkin'].version.version[/^3/]
      config.filter_run_excluding :gherkin2 => true,
                                  :gherkin4 => true
    else
      config.filter_run_excluding :gherkin3 => true,
                                  :gherkin4 => true
  end

  config.before(:all) do
    @default_file_directory = "#{File.dirname(__FILE__)}/temp_files"
    @default_feature_file_name = 'test_feature.feature'
  end

  config.before(:each) do
    FileUtils.remove_dir(@default_file_directory, true) if File.exists?(@default_file_directory)<commit_msg>Dropping 'require_relative' usage.<commit_after>require 'simplecov' unless RUBY_VERSION.to_s < '1.9.0'


this_dir = File.dirname(__FILE__)

require "#{this_dir}/../lib/cuke_modeler"

require "#{this_dir}/unit/feature_element_unit_specs"
require "#{this_dir}/unit/nested_element_unit_specs"
require "#{this_dir}/unit/tagged_element_unit_specs"
require "#{this_dir}/unit/containing_element_unit_specs"
require "#{this_dir}/unit/bare_bones_unit_specs"
require "#{this_dir}/unit/test_element_unit_specs"
require "#{this_dir}/unit/prepopulated_unit_specs"
require "#{this_dir}/unit/sourced_element_unit_specs"
require "#{this_dir}/unit/raw_element_unit_specs"


RSpec.configure do |config|
  case
    when Gem.loaded_specs['gherkin'].version.version[/^4/]
      config.filter_run_excluding :gherkin2 => true,
                                  :gherkin3 => true
    when Gem.loaded_specs['gherkin'].version.version[/^3/]
      config.filter_run_excluding :gherkin2 => true,
                                  :gherkin4 => true
    else
      config.filter_run_excluding :gherkin3 => true,
                                  :gherkin4 => true
  end

  config.before(:all) do
    @default_file_directory = "#{this_dir}/temp_files"
    @default_feature_file_name = 'test_feature.feature'
  end

  config.before(:each) do
    FileUtils.remove_dir(@default_file_directory, true) if File.exists?(@default_file_directory)
{'fraction_non_alphanumeric': 0.11021897810218978, 'fraction_numerical': 0.008029197080291971, 'mean_word_length': 3.929856115107914, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2599038', 'n_tokens_mistral': 940, 'n_tokens_neox': 902, 'n_words': 129}