Sha256: 37fe3f0307eb800e223a46f3bbdbe810fa147a3636489aa174cdfdacfca5e5cb

Contents?: true

Size: 644 Bytes

Versions: 4

Compression:

Stored size: 644 Bytes

Contents

module Alf
  describe Heading, "merge" do

    subject{ left.merge(right) }

    context 'with disjoint headings' do
      let(:left) { Heading[:name => String] }
      let(:right){ Heading[:city => String] }

      it "computes the union" do
        subject.should eq(Heading[:name => String, :city => String])
      end
    end

    context 'with non disjoint headings' do
      let(:left) { Heading[:id => Integer, :name => String] }
      let(:right){ Heading[:id => Integer, :name => Integer] }

      it "computes uses right on commons" do
        subject.should eq(Heading[:id => Integer, :name => Integer])
      end
    end

  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
alf-core-0.15.0 spec/unit/alf-types/heading/test_merge.rb
alf-core-0.14.0 spec/unit/alf-types/heading/test_merge.rb
alf-core-0.13.1 spec/unit/alf-types/heading/test_merge.rb
alf-core-0.13.0 spec/unit/alf-types/heading/test_merge.rb