Sha256: 1f51c5d224e15836e8d1ddeac917f074cce96bb4d0e2a22431bf521dbb5178b8

Contents?: true

Size: 992 Bytes

Versions: 14

Compression:

Stored size: 992 Bytes

Contents

require_relative '../../spec_helper'

# Load the class under test
require_relative '../../../lib/rley/ptree/parse_tree_node'

module Rley # Open this namespace to avoid module qualifier prefixes
  module PTree # Open this namespace to avoid module qualifier prefixes
    describe ParseTreeNode do
      let(:sample_symbol) { double('fake-symbol') }
      let(:sample_range) { { low: 0, high: 5 }  }
      
      subject { ParseTreeNode.new(sample_symbol, sample_range) }

      context 'Initialization:' do
        it 'should be created with a symbol and a range' do
          args = [ sample_symbol, sample_range ]
          expect { ParseTreeNode.new(*args) }.not_to raise_error
        end

        it 'should know its symbol' do
          expect(subject.symbol).to eq(sample_symbol)
        end
        
        it 'should know its range' do
          expect(subject.range).to eq(sample_range)
        end
      end # context
    end # describe
  end # module
end # module

# End of file

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
rley-0.2.10 spec/rley/ptree/parse_tree_node_spec.rb
rley-0.2.09 spec/rley/ptree/parse_tree_node_spec.rb
rley-0.2.08 spec/rley/ptree/parse_tree_node_spec.rb
rley-0.2.06 spec/rley/ptree/parse_tree_node_spec.rb
rley-0.2.05 spec/rley/ptree/parse_tree_node_spec.rb
rley-0.2.04 spec/rley/ptree/parse_tree_node_spec.rb
rley-0.2.03 spec/rley/ptree/parse_tree_node_spec.rb
rley-0.2.02 spec/rley/ptree/parse_tree_node_spec.rb
rley-0.2.01 spec/rley/ptree/parse_tree_node_spec.rb
rley-0.2.00 spec/rley/ptree/parse_tree_node_spec.rb
rley-0.1.12 spec/rley/ptree/parse_tree_node_spec.rb
rley-0.1.11 spec/rley/ptree/parse_tree_node_spec.rb
rley-0.1.10 spec/rley/ptree/parse_tree_node_spec.rb
rley-0.1.09 spec/rley/ptree/parse_tree_node_spec.rb