Sha256: 9779e8007e797a0d5e7bdaeb4c838e83efd499b3e20d2dc09f5c97b269f9e5c2

Contents?: true

Size: 709 Bytes

Versions: 2

Compression:

Stored size: 709 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

describe Optimizer::Algebra::Product::TableDeeRight, '#optimizable?' do
  subject { object.optimizable? }

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

  before do
    expect(object.operation).to be_kind_of(Algebra::Product)
  end

  context 'when the right operand is a table dee' do
    let(:right) { TABLE_DEE }

    it { should be(true) }
  end

  context 'when the right operand is not table dee' do
    let(:right) { TABLE_DUM }

    it { should be(false) }
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
axiom-optimizer-0.2.0 spec/unit/axiom/optimizer/algebra/product/table_dee_right/optimizable_predicate_spec.rb
axiom-optimizer-0.1.1 spec/unit/axiom/optimizer/algebra/product/table_dee_right/optimizable_predicate_spec.rb