spec/zenlish/parser/lesson1_spec.rb in zenlish-0.2.05 vs spec/zenlish/parser/lesson1_spec.rb in zenlish-0.2.06
- old
+ new
@@ -1,6 +1,7 @@
# frozen_string_literal: true
+
require_relative '../../spec_helper' # Use the RSpec framework
require_relative '../support/var2word'
require_relative '../../../lib/zenlish/parser/zparser' # Load the class under test
module Zenlish
@@ -12,11 +13,10 @@
context 'Parsing lesson 1:' do
it 'should parse sample sentences from lesson 1-A' do
# Sentence 1-01: "Tony sees Lisa."
# in absence of a tokenizer, we create a sequence of literals by hand...
- # prox_tony = ZProxy.new(tony)
literals = [tony, sees, lisa, dot]
expect { subject.to_pforest(literals) }.not_to raise_error
# Sentence 1-02a: "Tony sees something."
sentence_literals = [tony, sees, something, dot]
@@ -124,10 +124,10 @@
expect { subject.to_pforest(literals) }.not_to raise_error
# Sentence 1-15c: "There are more people inside the other thing
# than there are inside this thing."
literals = [there, are, more, people, inside, the, other, thing,
- than, there, are, inside, this, thing, dot]
+ than, there, are, inside, this, thing, dot]
# Ambiguous parse
expect { subject.to_pforest(literals) }.not_to raise_error
end
it 'should parse sample sentences from lesson 1-E' do