Sha256: 74225d02cfe0722f8faca8e9a0f84ad11427bd2ad9d0aff389247cd4d8f42e4f

Contents?: true

Size: 606 Bytes

Versions: 2

Compression:

Stored size: 606 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

describe Optimizer::Algebra::Difference::EqualOperands, '#optimize' do
  subject { object.optimize }

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

  before do
    object.should be_optimizable
  end

  it { should be_kind_of(Relation::Empty) }

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

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
veritas-optimizer-0.0.5 spec/unit/veritas/optimizer/algebra/difference/equal_operands/optimize_spec.rb
veritas-optimizer-0.0.4 spec/unit/veritas/optimizer/algebra/difference/equal_operands/optimize_spec.rb