Sha256: 4e700b146d1e5f90fcb938dca4697ef92cf151755545737f18a385799e5cae29

Contents?: true

Size: 631 Bytes

Versions: 1

Compression:

Stored size: 631 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

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

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

  before do
    expect(object).to be_optimizable
  end

  it { should be_kind_of(Algebra::Extension) }

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

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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
axiom-optimizer-0.1.1 spec/unit/axiom/optimizer/algebra/extension/order_operand/optimize_spec.rb