Sha256: cf7486b6e3d334eb50daa8ecbfb278891acef27994a1fde00166b9a602ebabb1

Contents?: true

Size: 941 Bytes

Versions: 17

Compression:

Stored size: 941 Bytes

Contents

require_relative '../../spec_helper'

# Load the class under test
require_relative '../../../lib/rley/syntax/terminal'

module Rley # Open this namespace to avoid module qualifier prefixes
  module Syntax # Open this namespace to avoid module qualifier prefixes
    describe Terminal do
      let(:sample_name) { 'noun' }
      subject { Terminal.new(sample_name) }

      context 'Initialization:' do
        it 'should be created with a name' do
          expect { Terminal.new('noun') }.not_to raise_error
        end

        it 'should know its name' do
          expect(subject.name).to eq(sample_name)
        end
        
        it 'should know that is a terminal symbol' do
          expect(subject).to be_terminal
        end        
        
        it "should know that isn't nullable" do
          expect(subject).not_to be_nullable
        end
      end # context
    end # describe
  end # module
end # module

# End of file

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
rley-0.4.05 spec/rley/syntax/terminal_spec.rb
rley-0.4.04 spec/rley/syntax/terminal_spec.rb
rley-0.4.03 spec/rley/syntax/terminal_spec.rb
rley-0.4.02 spec/rley/syntax/terminal_spec.rb
rley-0.4.01 spec/rley/syntax/terminal_spec.rb
rley-0.4.00 spec/rley/syntax/terminal_spec.rb
rley-0.3.12 spec/rley/syntax/terminal_spec.rb
rley-0.3.11 spec/rley/syntax/terminal_spec.rb
rley-0.3.10 spec/rley/syntax/terminal_spec.rb
rley-0.3.09 spec/rley/syntax/terminal_spec.rb
rley-0.3.08 spec/rley/syntax/terminal_spec.rb
rley-0.3.07 spec/rley/syntax/terminal_spec.rb
rley-0.3.06 spec/rley/syntax/terminal_spec.rb
rley-0.3.05 spec/rley/syntax/terminal_spec.rb
rley-0.3.04 spec/rley/syntax/terminal_spec.rb
rley-0.3.01 spec/rley/syntax/terminal_spec.rb
rley-0.3.00 spec/rley/syntax/terminal_spec.rb