Sha256: 32072e639220b76b6bc5b48db74be077585d9f1b8079809c3a8f63bb79cf52fc
Contents?: true
Size: 583 Bytes
Versions: 3
Compression:
Stored size: 583 Bytes
Contents
# encoding: utf-8 require 'spec_helper' describe Optimizer::Algebra::Summarization::OrderOperand, '#optimizable?' do subject { object.optimizable? } let(:base) { Relation.new([ [ :id, Integer ] ], [].each) } let(:relation) { operand.summarize([]) {} } let(:object) { described_class.new(relation) } context 'when operand is an order' do let(:operand) { base.sort_by { |r| r.id } } it { should be(true) } end context 'when operand is not an order' do let(:operand) { base } it { should be(false) } end end
Version data entries
3 entries across 3 versions & 1 rubygems