Sha256: e1e63b2ea268bde427e306515f9ae8fc3d47cf26b5da53f9b917915cdf9de861
Contents?: true
Size: 500 Bytes
Versions: 1
Compression:
Stored size: 500 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.en_US.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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rambling-trie-0.9.3 | spec/lib/rambling/trie/plain_text_reader_spec.rb |