Sha256: ebf6e0dc02c84f6ffe7619dedf1e170e33868230ed6fac8196b7653010ded7c0

Contents?: true

Size: 733 Bytes

Versions: 4

Compression:

Stored size: 733 Bytes

Contents

require 'spec_helper'
module Alf
  module Algebra
    describe Union, 'heading' do

      let(:left){
        an_operand.with_heading(:id => Integer, :name => String)
      }
      let(:expected){
        Heading[:id => Integer, :name => String]
      }

      let(:op){
        a_lispy.union(left, right)
      }
      subject{ op.heading }

      context 'when exactly same heading' do
        let(:right){
          an_operand.with_heading(:id => Integer, :name => String)
        }

        it { should eq(expected) }
      end

      context 'with some subtypes' do
        let(:right){
          an_operand.with_heading(:id => Fixnum, :name => String)
        }

        it { should eq(expected) }
      end

    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
alf-core-0.15.0 spec/unit/alf-algebra/operator/union/test_heading.rb
alf-core-0.14.0 spec/unit/alf-algebra/operator/union/test_heading.rb
alf-core-0.13.1 spec/unit/alf-algebra/operator/union/test_heading.rb
alf-core-0.13.0 spec/unit/alf-algebra/operator/union/test_heading.rb