Sha256: 3d499f3cee10124ca9ce9a9d3aa9a3ddfafd738cb01e7597e271ef195245062d

Contents?: true

Size: 651 Bytes

Versions: 19

Compression:

Stored size: 651 Bytes

Contents

require 'spec_helper'
module Finitio
  describe MultiTupleType, "initialize" do

    let(:heading){
      Heading.new([Attribute.new(:a, intType)])
    }

    context 'with a valid heading' do
      subject{ MultiTupleType.new(heading) }

      it{ should be_a(MultiTupleType) }

      it 'correctly sets the instance variable' do
        expect(subject.heading).to eq(heading)
      end
    end

    context 'with an invalid heading' do
      subject{ MultiTupleType.new("foo") }

      it 'should raise an error' do
        expect{
          subject
        }.to raise_error(ArgumentError, "Heading expected, got `foo`")
      end
    end

  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
finitio-0.12.0 spec/type/multi_tuple_type/test_initialize.rb
finitio-0.11.4 spec/type/multi_tuple_type/test_initialize.rb
finitio-0.11.3 spec/type/multi_tuple_type/test_initialize.rb
finitio-0.11.2 spec/type/multi_tuple_type/test_initialize.rb
finitio-0.11.1 spec/type/multi_tuple_type/test_initialize.rb
finitio-0.10.0 spec/type/multi_tuple_type/test_initialize.rb
finitio-0.9.1 spec/type/multi_tuple_type/test_initialize.rb
finitio-0.9.0 spec/type/multi_tuple_type/test_initialize.rb
finitio-0.8.0 spec/type/multi_tuple_type/test_initialize.rb
finitio-0.7.0 spec/type/multi_tuple_type/test_initialize.rb
finitio-0.7.0.pre.rc4 spec/type/multi_tuple_type/test_initialize.rb
finitio-0.7.0.pre.rc3 spec/type/multi_tuple_type/test_initialize.rb
finitio-0.7.0.pre.rc2 spec/type/multi_tuple_type/test_initialize.rb
finitio-0.7.0.pre.rc1 spec/type/multi_tuple_type/test_initialize.rb
finitio-0.6.1 spec/type/multi_tuple_type/test_initialize.rb
finitio-0.6.0 spec/type/multi_tuple_type/test_initialize.rb
finitio-0.5.2 spec/type/multi_tuple_type/test_initialize.rb
finitio-0.5.1 spec/type/multi_tuple_type/test_initialize.rb
finitio-0.5.0 spec/type/multi_tuple_type/test_initialize.rb