Sha256: 1a5a8f7a19559ef63f8a383b4fab06c00fb7c2d8421809d9bc117a45652130de

Contents?: true

Size: 602 Bytes

Versions: 3

Compression:

Stored size: 602 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

describe Optimizer::Algebra::Extension::OrderOperand, '#optimize' do
  subject { object.optimize }

  let(:base)     { Relation.new([ [ :id, Integer ] ], [].each) }
  let(:operand)  { base.sort_by { |r| r.id }                   }
  let(:relation) { operand.extend {}                           }
  let(:object)   { described_class.new(relation)               }

  before do
    object.should be_optimizable
  end

  it { should be_kind_of(Algebra::Extension) }

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

  its(:extensions) { should eql(relation.extensions) }
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
veritas-optimizer-0.0.7 spec/unit/veritas/optimizer/algebra/extension/order_operand/optimize_spec.rb
veritas-optimizer-0.0.6 spec/unit/veritas/optimizer/algebra/extension/order_operand/optimize_spec.rb
veritas-optimizer-0.0.5 spec/unit/veritas/optimizer/algebra/extension/order_operand/optimize_spec.rb