spec/zenlish/lex/lexeme_spec.rb in zenlish-0.2.04 vs spec/zenlish/lex/lexeme_spec.rb in zenlish-0.2.05

- old
+ new

@@ -13,11 +13,12 @@ let(:a_wclass) { WClasses::CommonNoun.new } let(:a_lemma) { 'people' } let(:an_entry) { LexicalEntry.new(a_lemma) } let(:a_feat_struct_def) { - { 'NUMBER' => enumeration(:plural) } + { 'NUMBER' => enumeration(:plural), + 'PARADIGM' => [identifier, 'Plural_only'] } } subject { Lexeme.new(a_wclass, an_entry) } context 'Initialization:' do @@ -37,10 +38,11 @@ expect(subject.entry).to eq(an_entry) end end # context context 'Provided services:' do + subject { Lexeme.new(a_wclass, an_entry, a_feat_struct_def) } it 'should know its lemma' do expect(subject.lemma).to eq(a_lemma) end it 'should know its own feature defs' do @@ -49,9 +51,13 @@ end it 'should know its inflection paradigm' do expect(subject.paradigm).to be_kind_of(Inflect::InflectionTable) end + + it 'should know all its inflections' do + expect(subject.all_inflections).to eq(['people']) + end end # context end # describe end # module end # module