spec/zenlish/wclasses/irregular_verb_spec.rb in zenlish-0.2.04 vs spec/zenlish/wclasses/irregular_verb_spec.rb in zenlish-0.2.05

- old
+ new

@@ -43,10 +43,16 @@ verb = build_verb(verb_form, p_simple, p_participle) pairs.each do |(constraints, expected_form)| expect(verb.inflect(constraints)).to eq(expected_form) end end + + def test_all_inflections(verb_form, p_simple, p_participle, wforms) + verb = build_verb(verb_form, p_simple, p_participle) + inflected = verb.all_inflections + expect(inflected.sort).to eq(wforms.sort) + end it 'should know how to inflect irregular verbs' do expectations_1 = [ [present_1sg, 'see'], [present_3sg, 'sees'], @@ -65,9 +71,13 @@ [past_simple, 'made'], [past_participle, 'made'] ] test_inflection_of('make', 'made', 'made', expectations_2) end + + it 'should give all word forms of a given verb' do + test_all_inflections('see', 'saw', 'seen', ['see', 'sees', 'seeing', 'saw', 'seen']) + end end # context end # describe end # module end # module