spec/rley/ptree/terminal_node_spec.rb in rley-0.7.07 vs spec/rley/ptree/terminal_node_spec.rb in rley-0.7.08

- old
+ new

@@ -8,26 +8,26 @@ module Rley # Open this namespace to avoid module qualifier prefixes module PTree # Open this namespace to avoid module qualifier prefixes describe TerminalNode do let(:sample_symbol) { OpenStruct.new(name: 'Noun') } - let(:sample_token) do - OpenStruct.new(lexeme: 'world', terminal: sample_symbol) + let(:sample_token) do + OpenStruct.new(lexeme: 'world', terminal: sample_symbol) end let(:sample_range) { double('fake-range') } - + subject { TerminalNode.new(sample_token, sample_range) } - + context 'Initialization:' do it 'should be bound to a token' do expect(subject.token).to eq(sample_token) end end # context - + context 'Provided services:' do it 'should provide a text representation of itself' do expected_text = "Noun[?, ?]: 'world'" - expect(subject.to_string(0)).to eq(expected_text) + expect(subject.to_string(0)).to eq(expected_text) end end # context end # describe end # module end # module