Sha256: 7778bee8ba649adfdf24d6e799df7a636490506a241687dce34dc7abc57f0ce7

Contents?: true

Size: 581 Bytes

Versions: 3

Compression:

Stored size: 581 Bytes

Contents

require 'spec_helper'
module Qrb
  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

3 entries across 3 versions & 1 rubygems

Version Path
qrb-0.3.0 spec/unit/heading/test_size.rb
qrb-0.2.0 spec/unit/heading/test_size.rb
qrb-0.1.0 spec/unit/heading/test_size.rb