Sha256: aface3833f6f3abe2ec5b6bd48c7280c201f12c912aaf38cd783f3081911886d
Contents?: true
Size: 651 Bytes
Versions: 3
Compression:
Stored size: 651 Bytes
Contents
# encoding: utf-8 require 'spec_helper' describe Optimizer::Relation::Operation::Order::OrderOperand, '#optimize' do subject { object.optimize } let(:base) { Relation.new([ [ :id, Integer ] ], [ [ 1 ] ].each) } let(:order) { base.sort_by { |r| r.id } } let(:relation) { order.sort_by { order.directions.reverse } } let(:object) { described_class.new(relation) } before do object.should be_optimizable end it { should be_kind_of(Relation::Operation::Order) } its(:operand) { should equal(base) } its(:directions) { should eql(order.directions.reverse) } end
Version data entries
3 entries across 3 versions & 1 rubygems