Sha256: fbfce68c6acb0bb49f534e40709df82a1f6758b97f42fee6ca6c9d1329a8f228
Contents?: true
Size: 600 Bytes
Versions: 3
Compression:
Stored size: 600 Bytes
Contents
# encoding: utf-8 require 'spec_helper' describe Optimizer::Relation::Operation::Reverse::ReverseOperand, '#optimize' do subject { object.optimize } let(:base) { Relation.new([ [ :id, Integer ] ], [ [ 1 ] ].each) } let(:limit) { base.sort_by { |r| r.id }.take(2) } let(:operand) { limit.reverse } let(:relation) { operand.reverse } let(:object) { described_class.new(relation) } before do object.should be_optimizable end it { should equal(limit) } end
Version data entries
3 entries across 3 versions & 1 rubygems