Sha256: 766eafc5afbda9d4582946254807386f5f1e17d606b394a4cb1cfc6551cd7b63

Contents?: true

Size: 682 Bytes

Versions: 1

Compression:

Stored size: 682 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

describe Optimizer::Relation::Operation::Binary::OrderRight, '#optimize' do
  subject { object.optimize }

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

  before do
    expect(object).to be_optimizable
  end

  it { should be_kind_of(relation.class) }

  its(:left) { should be(left) }

  its(:right) { should be(base) }
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
axiom-optimizer-0.1.1 spec/unit/axiom/optimizer/relation/operation/binary/order_right/optimize_spec.rb