Sha256: d582d1a8735dadc989d4a96c64cf9f6b1a4c0caabd1c0dc28be62c3a8fa12586

Contents?: true

Size: 659 Bytes

Versions: 4

Compression:

Stored size: 659 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

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

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

  before do
    object.should be_optimizable
  end

  it { should be_kind_of(Algebra::Union) }

  it { should_not equal(relation) }

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

  its(:right) { should equal(right) }
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
veritas-optimizer-0.0.7 spec/unit/veritas/optimizer/relation/operation/binary/unoptimized_operands/optimize_spec.rb
veritas-optimizer-0.0.6 spec/unit/veritas/optimizer/relation/operation/binary/unoptimized_operands/optimize_spec.rb
veritas-optimizer-0.0.5 spec/unit/veritas/optimizer/relation/operation/binary/unoptimized_operands/optimize_spec.rb
veritas-optimizer-0.0.4 spec/unit/veritas/optimizer/relation/operation/binary/unoptimized_operands/optimize_spec.rb