Sha256: ef29ee008da0c9422575b2919f3d58806a9b595b15e38835fa3ae83ee329b4f5

Contents?: true

Size: 557 Bytes

Versions: 2

Compression:

Stored size: 557 Bytes

Contents

require 'spec_helper'
module Finitio
  describe SeqType, 'initialize' do

    subject{
      SeqType.new(intType)
    }

    context 'with valid arguments' do
      it{ should be_a(SeqType) }

      it 'should set the instance variables' do
        subject.elm_type.should eq(intType)
      end
    end

    context 'with invalid arguments' do
      subject{ SeqType.new("foo") }

      it 'should raise an error' do
        ->{
          subject
        }.should raise_error(ArgumentError, 'Finitio::Type expected, got `foo`')
      end
    end

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
finitio-0.4.1 spec/unit/type/seq_type/test_initialize.rb
finitio-0.4.0 spec/unit/type/seq_type/test_initialize.rb