Sha256: 1e6185efeb5595c5feac4a99e85dc998778edd5b8c70864437f56dd4e2ac88ed

Contents?: true

Size: 687 Bytes

Versions: 4

Compression:

Stored size: 687 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

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

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

  before do
    object.operation.should 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

4 entries across 4 versions & 1 rubygems

Version Path
veritas-optimizer-0.0.7 spec/unit/veritas/optimizer/algebra/product/table_dee_right/optimizable_spec.rb
veritas-optimizer-0.0.6 spec/unit/veritas/optimizer/algebra/product/table_dee_right/optimizable_spec.rb
veritas-optimizer-0.0.5 spec/unit/veritas/optimizer/algebra/product/table_dee_right/optimizable_spec.rb
veritas-optimizer-0.0.4 spec/unit/veritas/optimizer/algebra/product/table_dee_right/optimizable_spec.rb