Sha256: ed5940aaf8df1279dd1612627f4f5593f21c967431ada8f7014fa13caf420896
Contents?: true
Size: 1.04 KB
Versions: 32
Compression:
Stored size: 1.04 KB
Contents
# frozen_string_literal: true require_relative '../../spec_helper' # Use the RSpec framework # Load module under test require_relative '../../../lib/zenlish/lex/empty_lexicon_factory' module Zenlish module Lex describe EmptyLexiconFactory do subject do obj = Object.new obj.extend(EmptyLexiconFactory) end context 'Mix-in integration:' do it 'should acquire the methods of the mix-in module' do expect(subject.respond_to?(:create_empty_lexicon)).to be_truthy end end # context context 'Created lexicon:' do it 'should allow the creation of empty lexicon' do expect(subject.create_empty_lexicon).to be_kind_of(Lexicon) end it 'should initialize lexicon with terminal symbols of the language' do lexicon = subject.create_empty_lexicon found = lexicon.terminals.find { |symb| symb.kind_of?(WClasses::CommonNoun) } expect(found).to be_truthy end end # context end # describe end # module end # module
Version data entries
32 entries across 32 versions & 1 rubygems