Sha256: af52b86e0ecb0f7fffde624dd8c0959a1ac88a4ae10e6812bf966400f0a1139b

Contents?: true

Size: 466 Bytes

Versions: 2

Compression:

Stored size: 466 Bytes

Contents

require 'spec_helper'
module Qrb
  describe Syntax, "seq_type" do

    subject{
      Syntax.parse(input, root: "seq_type")
    }

    let(:compiled){
      subject.compile(type_factory)
    }

    context '[.Integer]' do
      let(:input){ '[.Integer]' }

      it 'compiles to a SeqType' do
        compiled.should be_a(SeqType)
        compiled.elm_type.should be_a(BuiltinType)
        compiled.elm_type.ruby_type.should be(Integer)
      end
    end

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
qrb-0.2.0 spec/unit/syntax/nodes/test_seq_type.rb
qrb-0.1.0 spec/unit/syntax/nodes/test_seq_type.rb