Sha256: 926f179618bfe8ddcaca42e1ceddd8bb82dd10e7958f778651a83dce41d13fbf

Contents?: true

Size: 650 Bytes

Versions: 1

Compression:

Stored size: 650 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

describe Optimizer::Relation::Operation::Limit::ZeroLimit, '#optimize' do
  subject { object.optimize }

  let(:header)   { Relation::Header.coerce([[:id, Integer]])                            }
  let(:order)    { Relation.new(header, LazyEnumerable.new([[1]])).sort_by { |r| r.id } }
  let(:relation) { order.take(0)                                                        }
  let(:object)   { described_class.new(relation)                                        }

  before do
    expect(object).to be_optimizable
  end

  it { should be_kind_of(Relation::Empty) }

  its(:header) { should be(header) }
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
axiom-optimizer-0.1.1 spec/unit/axiom/optimizer/relation/operation/limit/zero_limit/optimize_spec.rb