Sha256: a5a5b1c0f2f5cc7bec98633684810869bff60c88c31ef35572efac9a131e3fd7

Contents?: true

Size: 537 Bytes

Versions: 1

Compression:

Stored size: 537 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

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

  let(:sorted)   { Relation.new([[:id, Integer]], LazyEnumerable.new([[1]])).sort_by { |r| r.id } }
  let(:relation) { sorted.drop(0)                                                                 }
  let(:object)   { described_class.new(relation)                                                  }

  before do
    expect(object).to be_optimizable
  end

  it { should be(sorted) }
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
axiom-optimizer-0.2.0 spec/unit/axiom/optimizer/relation/operation/offset/zero_offset/optimize_spec.rb