Sha256: 737fa327ab7658cba47dd521c166c9c6df40219c1dde4d58da1c75cac7480818

Contents?: true

Size: 571 Bytes

Versions: 1

Compression:

Stored size: 571 Bytes

Contents

require 'type_check_helper'
module Alf
  module Algebra
    describe Intersect, 'type_check' do

      subject{ op.type_check }

      context 'when ok' do
        let(:op){ 
          intersect(suppliers, suppliers)
        }

        it{ should eq(op.heading) }
      end

      context 'when heading mismatch' do
        let(:op){ 
          intersect(suppliers, supplies)
        }

        it 'should raise an error' do
          lambda{
            subject
          }.should raise_error(TypeCheckError, /heading mismatch/)
        end
      end

    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
alf-core-0.15.0 spec/unit/alf-algebra/operator/intersect/test_type_check.rb