Sha256: 684b1f063747ac0201d53435576bdbaf89ad5ffd265c049cd9b3347624384fdd

Contents?: true

Size: 709 Bytes

Versions: 19

Compression:

Stored size: 709 Bytes

Contents

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

    subject{ Heading.new(attributes) }

    context 'with no attribute' do
      let(:attributes){
        [ ]
      }

      it{ should be_a(Heading) }
    end

    context 'with valid attributes' do
      let(:attributes){
        [ Attribute.new(:red, intType) ]
      }

      it{ should be_a(Heading) }
    end

    context 'with invalid attributes' do
      let(:attributes){
        [ Attribute.new(:red, intType), Attribute.new(:red, intType) ]
      }

      it 'should raise an error' do
        expect{
          subject
        }.to raise_error(ArgumentError, "Attribute names must be unique")
      end
    end

  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

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