Sha256: 69684bf1d4a054dfeaabab1a199baf0c984c1e6ded7aefe1b16c90a55293ec06

Contents?: true

Size: 632 Bytes

Versions: 2

Compression:

Stored size: 632 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

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

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

  before do
    expect(object).to be_optimizable
  end

  it { should be_kind_of(Relation::Empty) }

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

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
axiom-optimizer-0.2.0 spec/unit/axiom/optimizer/algebra/difference/equal_operands/optimize_spec.rb
axiom-optimizer-0.1.1 spec/unit/axiom/optimizer/algebra/difference/equal_operands/optimize_spec.rb