Sha256: 71d4688d5da7124ca98fec7643c8714ea1fab33022974d90121f3601dff559f9

Contents?: true

Size: 637 Bytes

Versions: 1

Compression:

Stored size: 637 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

describe Optimizer::Relation::Operation::Sorted::UnoptimizedOperand, '#optimize' do
  subject { object.optimize }

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

  before do
    expect(object).to be_optimizable
  end

  it { should be_kind_of(Relation::Operation::Sorted) }

  it { should_not be(relation) }

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

  its(:directions) { should be(relation.directions) }
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
axiom-optimizer-0.2.0 spec/unit/axiom/optimizer/relation/operation/sorted/unoptimized_operand/optimize_spec.rb