Sha256: 4e81fdead985cce52fd0b4003a337249e53d12ee24f192e3e62c2709980c3167
Contents?: true
Size: 646 Bytes
Versions: 1
Compression:
Stored size: 646 Bytes
Contents
require 'optimizer_helper' module Alf describe "rename" do subject{ rename(an_operand, renaming) } context 'on a fully known predicate' do let(:predicate){ Predicate.eq(:y, 2) & Predicate.eq(:foo => 3) } let(:renaming) { {:x => :y} } let(:replaced_predicate){ Predicate.eq(:x, 2) & Predicate.eq(:foo => 3) } it_behaves_like "a pass-through expression for restrict" end context 'on a native predicate' do let(:predicate){ Predicate.native(->(t){ t.x == 2 }) } let(:renaming) { {:x => :y} } it_behaves_like "an unoptimizable expression for restrict" end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
alf-core-0.15.0 | spec/unit/alf-optimizer/test_rename.rb |