Sha256: d5e84c78115f2a2d129c55080a8a06c612d352e945c40c46618590a41fbd3079

Contents?: true

Size: 615 Bytes

Versions: 4

Compression:

Stored size: 615 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

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

  let(:left)     { Relation.new([ [ :id, Integer ] ], [ [ 1 ] ]) }
  let(:right)    { Relation.new([ [ :id, Integer ] ], [ [ 1 ] ]) }
  let(:relation) { left.union(right)                             }
  let(:object)   { described_class.new(relation)                 }

  before do
    object.should be_optimizable
  end

  it { should be_kind_of(Relation::Materialized) }

  its(:header) { should equal(relation.header) }

  it { should == [ [ 1 ] ] }
end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
axiom-optimizer-0.1.0 spec/unit/axiom/optimizer/relation/operation/binary/materialized_operands/optimize_spec.rb
veritas-optimizer-0.0.7 spec/unit/veritas/optimizer/relation/operation/binary/materialized_operands/optimize_spec.rb
veritas-optimizer-0.0.6 spec/unit/veritas/optimizer/relation/operation/binary/materialized_operands/optimize_spec.rb
veritas-optimizer-0.0.5 spec/unit/veritas/optimizer/relation/operation/binary/materialized_operands/optimize_spec.rb