Sha256: 36d4cb20588295366c8218d4ab068a4c58abdd1184c51ae77c9de27d24bcfb90
Contents?: true
Size: 853 Bytes
Versions: 4
Compression:
Stored size: 853 Bytes
Contents
# encoding: utf-8 require 'spec_helper' describe Optimizer::Algebra::Restriction::RestrictionOperand, '#optimize' do subject { object.optimize } let(:header) { Relation::Header.new([ [ :id, Integer ] ]) } let(:base) { Relation.new(header, [ [ 1 ] ].each) } let(:predicate) { header[:id].eq(1) } let(:other_predicate) { header[:id].include([ 1 ]) } let(:relation) { base.restrict { predicate }.restrict { other_predicate } } let(:object) { described_class.new(relation) } before do object.should be_optimizable end it { should be_kind_of(Algebra::Restriction) } its(:operand) { should equal(base) } its(:predicate) { should equal(predicate) } end
Version data entries
4 entries across 4 versions & 1 rubygems