Sha256: b7532314c7adc6b0dc10341064bed9172e23a9f3b8be205d98f77b0e8adca36d
Contents?: true
Size: 855 Bytes
Versions: 9
Compression:
Stored size: 855 Bytes
Contents
# frozen_string_literal: true require_relative '../../spec_helper' require_relative '../../../lib/dendroid/lexical/token_position' describe Dendroid::Lexical::TokenPosition do let(:ex_lineno) { 5 } let(:ex_column) { 7 } subject { described_class.new(ex_lineno, ex_column) } context 'Initialization:' do it 'is initialized with a line number and a column position' do expect { described_class.new(ex_lineno, ex_column) }.not_to raise_error end it 'knows its line number' do expect(subject.lineno).to eq(ex_lineno) end it 'knows its column number' do expect(subject.column).to eq(ex_column) end end # context context 'Provided services:' do it 'renders a String representation of itself' do expect(subject.to_s).to eq("#{ex_lineno}:#{ex_column}") end end # context end # describe
Version data entries
9 entries across 9 versions & 1 rubygems