Sha256: ac299d202b1467194acd74380caa52ae126e692d9febe16bdfaecdfdf9b41c93

Contents?: true

Size: 628 Bytes

Versions: 1

Compression:

Stored size: 628 Bytes

Contents

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

      subject{
        compiler.call(expr)
      }

      let(:expr){
        restrict(an_operand(leaf), predicate)
      }

      let(:predicate){
        Predicate.native(->{ true })
      }

      it_should_behave_like "a traceable compiled"

      it 'has a Filter cog' do
        subject.should be_a(Engine::Filter)
      end

      it 'has the correct predicate' do
        subject.predicate.should be(predicate)
      end

      it 'has the correct sub-cog' do
        subject.operand.should be(leaf)
      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_restrict.rb