Sha256: 7991246b8551c2df9ced33e66bab89ebe5c0602f848b333d3677b363fec6db28

Contents?: true

Size: 585 Bytes

Versions: 21

Compression:

Stored size: 585 Bytes

Contents

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

    let(:r){ Attribute.new(:red, intType) }
    let(:g){ Attribute.new(:green, intType) }
    let(:b){ Attribute.new(:blue, intType) }

    subject{ heading.size }

    context 'on an empty heading' do
      let(:heading){ Heading.new([]) }

      it{ should eq(0) }
    end

    context 'on an singleton heading' do
      let(:heading){ Heading.new([r]) }

      it{ should eq(1) }
    end

    context 'on an big heading' do
      let(:heading){ Heading.new([r, g, b]) }

      it{ should eq(3) }
    end

  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

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