<commit_before>require 'spec_helper'
describe Streamer::Finder do
  before :each do
    @finder = Streamer::Finder.new(
      Streamer::FactProviders::HashProvider.new(
        example: {
          nfl_teams: {
            panthers: {
              wins: 15
            }
          }
        }
      )
    )
  end

  it 'must have a fact provider' do
    @finder.fact_provider.wont_be_nil
  end

  it 'finds a value for a given key' do
    @finder.find('example.nfl_teams.panthers.wins').must_equal 15
  end
end<commit_msg>tests default provider for Streamer::FactProviders::HashProvider<commit_after>require 'spec_helper'
describe Streamer::Finder do
  before :each do
    @finder = Streamer::Finder.new(
      Streamer::FactProviders::HashProvider.new(
        example: {
          nfl_teams: {
            panthers: {
              wins: 15
            }
          }
        }
      )
    )
  end

  it 'must have a fact provider' do
    @finder.fact_provider.wont_be_nil
  end

  it 'finds a value for a given key' do
    @finder.find('example.nfl_teams.panthers.wins').must_equal 15
  end

  it 'has a default provider' do
    Streamer::Finder.new.fact_provider
                    .must_be_kind_of Streamer::FactProviders::HashProvider
  end
end
{'fraction_non_alphanumeric': 0.0903277378097522, 'fraction_numerical': 0.006394884092725819, 'mean_word_length': 2.2020460358056266, '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': '4989694', 'n_tokens_mistral': 411, 'n_tokens_neox': 405, 'n_words': 91}