<commit_before>require 'spec_helper'
require 'emeals'

describe Emeals::Client do
  subject(:client) { Emeals::Client.new }
  let(:menu_path) { File.join(File.dirname(__FILE__), 'fixtures', 'menu.pdf') }

  before(:each) do
    menu_text = menu_path.sub(/\.pdf$/, '.txt')
    Emeals::Client.stub(:pdf_to_text).and_return(File.read(menu_text))

    @menu = client.parse(menu_path)
  end

  it "counts the number of meals in the menu" do
    expect(@menu.count).to eq 7
  end

  it "reads the names of the entrees" do
    pending "need more work on parsing"

    meal = @menu.meals.first
    expect(meal.entree.name).to eq "Spicy Sausage and Egg Scramble"
  end
end<commit_msg>Fixed mistake in stubbing of test data<commit_after>require 'spec_helper'
require 'emeals'

describe Emeals::Client do
  subject(:client) { Emeals::Client.new }
  let(:menu_path) { File.join(File.dirname(__FILE__), 'fixtures', 'menu.pdf') }

  before(:each) do
    menu_text = menu_path.sub(/\.pdf$/, '.txt')
    client.stub(:pdf_to_text).and_return(File.read(menu_text))

    @menu = client.parse(menu_path)
  end

  it "counts the number of meals in the menu" do
    expect(@menu.count).to eq 7
  end

  it "reads the names of the entrees" do
    pending "need more work on parsing"

    meal = @menu.meals.first
    expect(meal.entree.name).to eq "Spicy Sausage and Egg Scramble"
  end
end
{'fraction_non_alphanumeric': 0.1302121433796635, 'fraction_numerical': 0.001463057790782736, 'mean_word_length': 3.833922261484099, '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': '6844950', 'n_tokens_mistral': 502, 'n_tokens_neox': 479, 'n_words': 127}