spec/unit/axiom/optimizer/relation/operation/limit/unoptimized_operand/optimize_spec.rb in axiom-optimizer-0.1.1 vs spec/unit/axiom/optimizer/relation/operation/limit/unoptimized_operand/optimize_spec.rb in axiom-optimizer-0.2.0
- old
+ new
@@ -4,19 +4,19 @@
describe Optimizer::Relation::Operation::Limit::UnoptimizedOperand, '#optimize' do
subject { object.optimize }
let(:header) { Relation::Header.coerce([[:id, Integer]]) }
- let(:order) { Relation.new(header, LazyEnumerable.new([[1]])).sort_by { |r| r.id } }
- let(:relation) { order.rename({}).take(1) }
+ 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(order) }
+ its(:operand) { should be(sorted) }
its(:limit) { should == 1 }
end