Sha256: ef462a333b568fe9a35d13dfe3a5b4519a163a06d9fa3ec4ebfa16bdc5266bae
Contents?: true
Size: 765 Bytes
Versions: 1
Compression:
Stored size: 765 Bytes
Contents
# encoding: utf-8 require 'spec_helper' describe Optimizer::Algebra::Rename::LimitOperand, '#optimizable?' do subject { object.optimizable? } let(:base) { Relation.new([ [ :id, Integer ] ], [ [ 1 ] ].each) } let(:aliases) { { :id => :other_id } } let(:relation) { operand.rename(aliases) } let(:object) { described_class.new(relation) } before do object.operation.should be_kind_of(Algebra::Rename) end context 'when the operand is an limit operation' do let(:operand) { base.order.take(1) } it { should be(true) } end context 'when the operand is not an limit operation' do let(:operand) { base } it { should be(false) } end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
veritas-optimizer-0.0.4 | spec/unit/veritas/optimizer/algebra/rename/limit_operand/optimizable_spec.rb |