Sha256: 047f9839f120c3e979caa65a94d908816408963606a784dbfadea6c5bc105078

Contents?: true

Size: 777 Bytes

Versions: 4

Compression:

Stored size: 777 Bytes

Contents

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

      let(:operand){
        an_operand.with_heading(:name => String)
      }
      let(:op){ 
        a_lispy.extend(operand, :computed => lambda{ 12 })
      }

      subject{ op.heading }

      context 'with proper expression analysis' do
        let(:expected){
          Heading[:name => String, :computed => Integer]
        }

        it { 
          pending "type inference on expressions not implemented" do
            should eq(expected)
          end
        }
      end

      context 'with current expression analysis' do
        let(:expected){
          Heading[:name => String, :computed => Object]
        }

        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/extend/test_heading.rb
alf-core-0.14.0 spec/unit/alf-algebra/operator/extend/test_heading.rb
alf-core-0.13.1 spec/unit/alf-algebra/operator/extend/test_heading.rb
alf-core-0.13.0 spec/unit/alf-algebra/operator/extend/test_heading.rb