<commit_before>require 'spec_helper'

describe Scraper do
  describe '.search_for(query, location)' do

    # Issa's snail haiku contains 'snail'
    it 'returns an array' do
      result = Scraper.search_for('snail', 'http://issa-haiku.org/snail.html')

      expect(result).to be_an_instance_of(Array)
    end

    # Issa's mock haiku web page contains 'haiku' three times, two of which are lowercase
    it 'ignores case of query' do
      result = Scraper.search_for('haiku', 'http://issa-haiku.org/snail.html')

      expect(result.length).to eq(4)
    end

    # Issa's snail haiku does not contain 'snake'
    it 'returns false when not found' do
      result = Scraper.search_for('snake', 'http://issa-haiku.org/snail.html')

      expect(result).to be_false
      expect(result).to_not be_nil # Ensure RSpec does not report a false positive
    end
  end
end<commit_msg>three -> four typo<commit_after>require 'spec_helper'

describe Scraper do
  describe '.search_for(query, location)' do

    # Issa's snail haiku contains 'snail'
    it 'returns an array' do
      result = Scraper.search_for('snail', 'http://issa-haiku.org/snail.html')

      expect(result).to be_an_instance_of(Array)
    end

    # Issa's mock haiku web page contains 'haiku' four times, two of which are lowercase
    it 'ignores case of query' do
      result = Scraper.search_for('haiku', 'http://issa-haiku.org/snail.html')

      expect(result.length).to eq(4)
    end

    # Issa's snail haiku does not contain 'snake'
    it 'returns false when not found' do
      result = Scraper.search_for('snake', 'http://issa-haiku.org/snail.html')

      expect(result).to be_false
      expect(result).to_not be_nil # Ensure RSpec does not report a false positive
    end
  end
end
{'fraction_non_alphanumeric': 0.11010215664018161, 'fraction_numerical': 0.0011350737797956867, 'mean_word_length': 3.2481927710843372, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, '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': '878846', 'n_tokens_mistral': 601, 'n_tokens_neox': 582, 'n_words': 167}