Sha256: 70bc6aa3a562a01707b8eda7cf60c5d989a1b1933cf8f3f0937f2e1aa682e9e0

Contents?: true

Size: 484 Bytes

Versions: 8

Compression:

Stored size: 484 Bytes

Contents

require 'spec_helper'

describe HSS::Parser do
  let(:config) { 'spec/test/config.yml' }
  let(:handler) { HSS::Handler.new config }

  describe '#expand' do
    it 'matches keywords in a mapping' do
      expect(handler.handle 'exp_a').to eql 'exp_alpha'
      expect(handler.handle 'exp_2').to eql 'exp_beta'
    end
    context 'when no match is found' do
      it 'raises an error' do
        expect { handler.handle 'exp_c' }.to raise_error NameError
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
hss-1.0.1 spec/helpers/expand_spec.rb
hss-1.0.0 spec/helpers/expand_spec.rb
hss-0.2.11 spec/helpers/expand_spec.rb
hss-0.2.10 spec/helpers/expand_spec.rb
hss-0.2.9 spec/helpers/expand_spec.rb
hss-0.2.8 spec/helpers/expand_spec.rb
hss-0.2.6 spec/helpers/expand_spec.rb
hss-0.2.5 spec/helpers/expand_spec.rb