Sha256: 95a9c792a6fdba18b925d7714af5ce226fc908e19da3908c79b4734583f2fb9a
Contents?: true
Size: 756 Bytes
Versions: 4
Compression:
Stored size: 756 Bytes
Contents
# encoding: utf-8 require 'spec_helper' describe Optimizer::Algebra::Projection::EmptyOperand, '#optimizable?' do subject { object.optimizable? } let(:header) { Relation::Header.new([ [ :id, Integer ], [ :name, String ] ]) } let(:relation) { operand.project([ :id ]) } let(:object) { described_class.new(relation) } before do object.operation.should be_kind_of(Algebra::Projection) end context 'when the operand is empty' do let(:operand) { Relation::Empty.new(header) } it { should be(true) } end context 'when the operand is not empty' do let(:operand) { Relation.new(header, [ [ 1, 'Dan Kubb' ] ]) } it { should be(false) } end end
Version data entries
4 entries across 4 versions & 1 rubygems