<commit_before>require File.expand_path('../../spec_helper', __FILE__)

describe 'Path#require_tree' do
  around(:each) do |example|
    Path.tmpchdir('path-test') do
      %w[foo/foo1.rb foo/foo2.rb bar.rb].map(&Path).each(&:touch!)
      example.run
    end
  end

  let(:features) { $LOADED_FEATURES }

  specify 'given directory' do
    expect { Path.require_tree 'foo' }.to change { features.size }.by 2
  end

  specify 'default directory' do
    expect {
      Path('bar.rb').write('Path.require_tree')
      require Path('bar.rb').expand
    }.to change { features.size }.by 3
  end

  specify 'epath directory' do
    expect { Path['foo'].require_tree }.to change { features.size }.by 2
  end
end<commit_msg>always use 'it' in RSpec for consistency<commit_after>require File.expand_path('../../spec_helper', __FILE__)

describe 'Path#require_tree' do
  around(:each) do |example|
    Path.tmpchdir('path-test') do
      %w[foo/foo1.rb foo/foo2.rb bar.rb].map(&Path).each(&:touch!)
      example.run
    end
  end

  let(:features) { $LOADED_FEATURES }

  it 'given directory' do
    expect { Path.require_tree 'foo' }.to change { features.size }.by 2
  end

  it 'default directory' do
    expect {
      Path('bar.rb').write('Path.require_tree')
      require Path('bar.rb').expand
    }.to change { features.size }.by 3
  end

  it 'epath directory' do
    expect { Path['foo'].require_tree }.to change { features.size }.by 2
  end
end
{'fraction_non_alphanumeric': 0.1479944674965422, 'fraction_numerical': 0.006915629322268326, 'mean_word_length': 3.170028818443804, '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': '4380042', 'n_tokens_mistral': 508, 'n_tokens_neox': 490, 'n_words': 123}