Sha256: 05d64992d602d8b499a0d3865064312a40874a95df19e851c484157618f16508

Contents?: true

Size: 722 Bytes

Versions: 1

Compression:

Stored size: 722 Bytes

Contents

require 'compiler_helper'
module Alf
  class Compiler
    describe Default, "minus" do

      subject{
        compiler.call(expr)
      }

      let(:right){
        compact(an_operand(leaf))
      }

      let(:expr){
        minus(an_operand(leaf), right)
      }

      it_should_behave_like "a traceable compiled"

      it 'has a Join::Hash cog' do
        subject.should be_a(Engine::Semi::Hash)
      end

      it 'has the correct left sub-cog' do
        subject.left.should be(leaf)
      end

      it 'has the correct right sub-cog' do
        subject.right.should be_a(Engine::Compact)
      end

      it 'has the correct predicate' do
        subject.predicate.should be_false
      end

    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
alf-core-0.15.0 spec/unit/alf-compiler/default/test_minus.rb