Sha256: cf2243107907ecc4307865fc3116b86156714a0da5d8b4daccbd64168cc2dae7
Contents?: true
Size: 673 Bytes
Versions: 1
Compression:
Stored size: 673 Bytes
Contents
# encoding: utf-8 require 'spec_helper' describe Optimizer::Relation::Operation::Binary::OrderRight, '#optimizable?' do subject { object.optimizable? } let(:relation) { double('Relation', left: left, right: right) } let(:left) { double('Left') } let(:object) { described_class.new(relation) } context 'when right is an order' do let(:right) { Relation.new([[:id, Integer]], LazyEnumerable.new).sort_by { |r| r.id } } it { should be(true) } end context 'when right is not an order' do let(:right) { Relation.new([[:id, Integer]], LazyEnumerable.new) } it { should be(false) } end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
axiom-optimizer-0.1.1 | spec/unit/axiom/optimizer/relation/operation/binary/order_right/optimizable_predicate_spec.rb |