Sha256: bf4b851783624110450a819c522ee6cd13a3b3eeab949b9631831939c02ebca2
Contents?: true
Size: 495 Bytes
Versions: 4
Compression:
Stored size: 495 Bytes
Contents
require 'spec_helper' module Rambling module Trie describe PlainTextReader do describe '#each_word' do let(:filepath) { File.join(::SPEC_ROOT, 'assets', 'test_words.txt') } let(:words) { File.readlines(filepath).map &:chomp } it 'yields every word yielded by the file' do yielded_words = [] subject.each_word(filepath) { |word| yielded_words << word } expect(yielded_words).to eq(words) end end end end end
Version data entries
4 entries across 4 versions & 1 rubygems