Sha256: 01a487b6cdbb2ac988dcf5a35c77fbf8e0d8e6cf92f7e14c94a2a357e3d84512

Contents?: true

Size: 781 Bytes

Versions: 28

Compression:

Stored size: 781 Bytes

Contents

require_relative '../../spec_helper'

# Load the class under test
require_relative '../../../lib/rley/gfg/end_vertex'

module Rley # Open this namespace to avoid module qualifier prefixes
  module GFG # Open this namespace to avoid module qualifier prefixes
    describe EndVertex do
      let(:sample_nt) { double('NT') }
      subject { EndVertex.new(sample_nt) }

      context 'Initialization:' do
        it 'should be created with a non-terminal symbol' do
          expect { EndVertex.new(sample_nt) }.not_to raise_error
        end

        it 'should know its label' do
          expect(sample_nt).to receive(:to_s).and_return('NT')
          expect(subject.label).to eq('NT.')
        end
      end # context
    end # describe
  end # module
end # module

# End of file

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
rley-0.5.10 spec/rley/gfg/end_vertex_spec.rb
rley-0.5.09 spec/rley/gfg/end_vertex_spec.rb
rley-0.5.08 spec/rley/gfg/end_vertex_spec.rb
rley-0.5.07 spec/rley/gfg/end_vertex_spec.rb
rley-0.5.06 spec/rley/gfg/end_vertex_spec.rb
rley-0.5.05 spec/rley/gfg/end_vertex_spec.rb
rley-0.5.04 spec/rley/gfg/end_vertex_spec.rb
rley-0.5.03 spec/rley/gfg/end_vertex_spec.rb
rley-0.5.02 spec/rley/gfg/end_vertex_spec.rb
rley-0.5.01 spec/rley/gfg/end_vertex_spec.rb
rley-0.5.00 spec/rley/gfg/end_vertex_spec.rb
rley-0.4.08 spec/rley/gfg/end_vertex_spec.rb
rley-0.4.07 spec/rley/gfg/end_vertex_spec.rb
rley-0.4.06 spec/rley/gfg/end_vertex_spec.rb
rley-0.4.05 spec/rley/gfg/end_vertex_spec.rb
rley-0.4.04 spec/rley/gfg/end_vertex_spec.rb
rley-0.4.03 spec/rley/gfg/end_vertex_spec.rb
rley-0.4.02 spec/rley/gfg/end_vertex_spec.rb
rley-0.4.01 spec/rley/gfg/end_vertex_spec.rb
rley-0.4.00 spec/rley/gfg/end_vertex_spec.rb