<commit_before>require 'gearman'
require 'tempfile'

describe Gearman::Stream do

  let(:stream) { Tempfile.new('Gearman::Stream') }

  subject { described_class.new(stream) }

  after { stream.close && stream.unlink }

  it 'writes strings to IO streams' do
    subject.write('hello')

    stream.rewind
    stream.read.should include 'hello'<commit_msg>Just close the stream<commit_after>require 'gearman'
require 'tempfile'

describe Gearman::Stream do

  let(:stream) { Tempfile.new('Gearman::Stream') }

  subject { described_class.new(stream) }

  after { stream.close }

  it 'writes strings to IO streams' do
    subject.write('hello')

    stream.rewind
    stream.read.should include 'hello'
{'fraction_non_alphanumeric': 0.12125534950071326, 'fraction_numerical': 0.0, 'mean_word_length': 4.2781954887218046, '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': '6172263', 'n_tokens_mistral': 233, 'n_tokens_neox': 216, 'n_words': 53}