Sha256: 2ee18482a436cb8813180f294d40c39a45a60db476608f380ecb4616c2df8357

Contents?: true

Size: 595 Bytes

Versions: 1

Compression:

Stored size: 595 Bytes

Contents

require 'spec_helper'
module Alf
  module Lang
    module Parser
      describe Lispy, 'connection!' do

        context 'when bound' do
          let(:lispy){ Lispy.new([], 12) }

          it 'allows obtaining its connection' do
            lispy.connection!.should eq(12)
          end
        end

        context 'when unbound' do
          let(:lispy){ Lispy.new }

          it 'raises when connection is used without being bound' do
            lambda{
              lispy.connection!
            }.should raise_error(UnboundError)
          end
        end

      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
alf-core-0.15.0 spec/unit/alf-lang/parser/lispy/test_connection_bang.rb