Sha256: ae7edf2a91451d24a1b38f746c31bcf921aac67cb343cee87ce66f2520393b13
Contents?: true
Size: 669 Bytes
Versions: 1
Compression:
Stored size: 669 Bytes
Contents
# encoding: utf-8 require 'spec_helper' describe Optimizer::Algebra::Rename::OffsetOperand, '#optimize' do subject { object.optimize } let(:header) { Relation::Header.new([ [ :id, Integer ] ]) } let(:base) { Relation.new(header, [ [ 1 ] ].each) } let(:order) { base.order } let(:relation) { order.drop(1).rename(:id => :other_id) } let(:object) { described_class.new(relation) } before do object.should be_optimizable end it { should be_kind_of(Relation::Operation::Offset) } its(:operand) { should eql(order.rename(:id => :other_id)) } its(:offset) { should == 1 } end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
veritas-optimizer-0.0.4 | spec/unit/veritas/optimizer/algebra/rename/offset_operand/optimize_spec.rb |