<commit_before>describe ::RemoteRuby::LocalStdinAdapter do
  subject(:adapter) { described_class.new(working_dir: working_dir) }

  let(:working_dir) do
    File.realpath(Dir.mktmpdir)
  end

  let(:cache_dir) do
    Dir.mktmpdir
  end

  after(:each) do
    FileUtils.rm_rf(working_dir)
    FileUtils.rm_rf(cache_dir)
  end

  it 'changes to the working dir' do
    pwd = nil

    adapter.open('puts Dir.pwd') do |stdout, _stderr|
      pwd = stdout.read
      pwd.strip!
    end

    expect(pwd).to eq(working_dir)
  end
end
<commit_msg>Removed redundant assignments and cleanup<commit_after>describe ::RemoteRuby::LocalStdinAdapter do
  subject(:adapter) { described_class.new(working_dir: working_dir) }

  let(:working_dir) do
    File.realpath(Dir.mktmpdir)
  end

  after(:each) do
    FileUtils.rm_rf(working_dir)
  end

  it 'changes to the working dir' do
    pwd = nil

    adapter.open('puts Dir.pwd') do |stdout, _stderr|
      pwd = stdout.read
      pwd.strip!
    end

    expect(pwd).to eq(working_dir)
  end

  it 'is launched in a separate process' do
    new_pid = nil

    adapter.open('puts Process.pid') do |stdout, _stderr|
      new_pid = stdout.read.to_i
    end

    expect(new_pid).not_to be_nil
    expect(new_pid).not_to be_zero
    expect(new_pid).not_to eq(Process.pid)
  end
end

{'fraction_non_alphanumeric': 0.10213414634146341, 'fraction_numerical': 0.0, 'mean_word_length': 3.3049180327868855, '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': '2652277', 'n_tokens_mistral': 494, 'n_tokens_neox': 471, 'n_words': 106}