Sha256: 598f367447d4c5c88ad2925a5ec57e1bf8a6abca976248d6e6217d7e5ca38f83

Contents?: true

Size: 567 Bytes

Versions: 2

Compression:

Stored size: 567 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

describe Optimizer::Algebra::Union::EmptyLeft, '#optimize' do
  subject { object.optimize }

  let(:header)   { Relation::Header.coerce([[:id, Integer]])       }
  let(:left)     { Relation::Empty.new(header)                     }
  let(:right)    { Relation.new(header, LazyEnumerable.new([[2]])) }
  let(:relation) { left.union(right)                               }
  let(:object)   { described_class.new(relation)                   }

  before do
    expect(object).to be_optimizable
  end

  it { should be(right) }
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
axiom-optimizer-0.2.0 spec/unit/axiom/optimizer/algebra/union/empty_left/optimize_spec.rb
axiom-optimizer-0.1.1 spec/unit/axiom/optimizer/algebra/union/empty_left/optimize_spec.rb