Sha256: fab14ee1c279ebe3284d6d1d289e1bcb37d2f2ee91598e3b142f30870405bf53
Contents?: true
Size: 494 Bytes
Versions: 6
Compression:
Stored size: 494 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
6 entries across 6 versions & 1 rubygems