Sha256: fefc683d9906bf41f6d49958cf57ff8171062f9d4a1a7dce5ada38a7dbce7d83

Contents?: true

Size: 736 Bytes

Versions: 1

Compression:

Stored size: 736 Bytes

Contents

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

      subject{
        compiler.call(expr)
      }

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

      let(:expr){
        not_matching(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_not_matching.rb