spec/zenlish/wclasses/irregular_verb_spec.rb in zenlish-0.2.05 vs spec/zenlish/wclasses/irregular_verb_spec.rb in zenlish-0.2.06
- old
+ new
@@ -43,41 +43,41 @@
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
+ end
it 'should know how to inflect irregular verbs' do
- expectations_1 = [
+ expectations1 = [
[present_1sg, 'see'],
[present_3sg, 'sees'],
[present_1pl, 'see'],
[progressive, 'seeing'],
[past_simple, 'saw'],
[past_participle, 'seen']
]
- test_inflection_of('see', 'saw', 'seen', expectations_1)
+ test_inflection_of('see', 'saw', 'seen', expectations1)
- expectations_2 = [
+ expectations2 = [
[present_1sg, 'make'],
[present_3sg, 'makes'],
[present_1pl, 'make'],
[progressive, 'making'],
[past_simple, 'made'],
[past_participle, 'made']
]
- test_inflection_of('make', 'made', 'made', expectations_2)
+ test_inflection_of('make', 'made', 'made', expectations2)
end
-
+
it 'should give all word forms of a given verb' do
- test_all_inflections('see', 'saw', 'seen', ['see', 'sees', 'seeing', 'saw', 'seen'])
- end
+ test_all_inflections('see', 'saw', 'seen', %w[see sees seeing saw seen])
+ end
end # context
end # describe
end # module
end # module