Sha256: 28749f8216f3ff19fef5c845527e85e92eb0013d3db68ce6943a64133aec822d

Contents?: true

Size: 648 Bytes

Versions: 2

Compression:

Stored size: 648 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

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

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

  before do
    object.should be_optimizable
  end

  it { should be_kind_of(Relation::Empty) }

  its(:header) { should equal(header) }

  its(:tuples) { should equal(relation) }
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
veritas-optimizer-0.0.7 spec/unit/veritas/optimizer/relation/operation/limit/zero_limit/optimize_spec.rb
veritas-optimizer-0.0.6 spec/unit/veritas/optimizer/relation/operation/limit/zero_limit/optimize_spec.rb