Sha256: b226da79ffc175d07553730abf1432af2d6b0063bdb9ce2fa5f4761136908785

Contents?: true

Size: 743 Bytes

Versions: 2

Compression:

Stored size: 743 Bytes

Contents

require 'spec_helper'

describe 'Veritas::Optimizer::Algebra::Product::TableDeeLeft#optimizable?' do
  subject { object.optimizable? }

  let(:klass)    { Optimizer::Algebra::Product::TableDeeLeft           }
  let(:right)    { Relation.new([ [ :id, Integer  ] ], [ [ 1 ] ].each) }
  let(:relation) { left.product(right)                                 }
  let(:object)   { klass.new(relation)                                 }

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

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

    it { should be(true) }
  end

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

    it { should be(false) }
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
veritas-0.0.2 spec/unit/veritas/optimizer/algebra/product/table_dee_left/optimizable_spec.rb
veritas-0.0.1 spec/unit/veritas/optimizer/algebra/product/table_dee_left/optimizable_spec.rb