Sha256: 78f6bdfa9e3051c78ad4b8d4c38aa997a60b56b4f6040d00d260b039713cb1aa
Contents?: true
Size: 702 Bytes
Versions: 1
Compression:
Stored size: 702 Bytes
Contents
# encoding: utf-8 require 'spec_helper' describe Optimizer::Relation::Operation::Limit::UnoptimizedOperand, '#optimize' do subject { object.optimize } let(:header) { Relation::Header.coerce([[:id, Integer]]) } let(:sorted) { Relation.new(header, LazyEnumerable.new([[1]])).sort_by { |r| r.id } } let(:relation) { sorted.rename({}).take(1) } let(:object) { described_class.new(relation) } before do expect(object).to be_optimizable end it { should be_kind_of(Relation::Operation::Limit) } its(:operand) { should be(sorted) } its(:limit) { should == 1 } end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
axiom-optimizer-0.2.0 | spec/unit/axiom/optimizer/relation/operation/limit/unoptimized_operand/optimize_spec.rb |