Sha256: 62a4783565b2c7dcedcf38e4a5f3adab21efe143b7193cc77f1836654621fd5e

Contents?: true

Size: 847 Bytes

Versions: 4

Compression:

Stored size: 847 Bytes

Contents

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

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

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

      context 'when disjoint headings' do
        let(:right){
          an_operand.with_heading(:foo => String)
        }
        let(:expected){
          Heading[:id => Integer, :name => String, :foo => String]
        }

        it { should eq(expected) }
      end

      context 'when non-disjoint headings' do
        let(:right){
          an_operand.with_heading(:id => Fixnum, :foo => String)
        }
        let(:expected){
          Heading[:id => Integer, :name => String, :foo => 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/join/test_heading.rb
alf-core-0.14.0 spec/unit/alf-algebra/operator/join/test_heading.rb
alf-core-0.13.1 spec/unit/alf-algebra/operator/join/test_heading.rb
alf-core-0.13.0 spec/unit/alf-algebra/operator/join/test_heading.rb