Sha256: c85224e164ec7d5ab263af40ad17ef14c2bb0bc003ac359ad830801d971cf45a

Contents?: true

Size: 572 Bytes

Versions: 1

Compression:

Stored size: 572 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

describe Optimizer::Relation::Operation::Offset::OffsetOperand, '#optimize' do
  subject { object.optimize }

  let(:order)    { Relation.new([ [ :id, Integer ] ], [ [ 1 ] ].each).order }
  let(:relation) { order.drop(1).drop(2)                                    }
  let(:object)   { described_class.new(relation)                            }

  before do
    object.should be_optimizable
  end

  it { should be_kind_of(Relation::Operation::Offset) }

  its(:operand) { should equal(order) }

  its(:offset) { should == 3 }
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
veritas-optimizer-0.0.4 spec/unit/veritas/optimizer/relation/operation/offset/offset_operand/optimize_spec.rb