Sha256: e8eecf3089dcad60653a7c47b61aac2a864800739bd84a0c8a124acfcb700d04

Contents?: true

Size: 500 Bytes

Versions: 5

Compression:

Stored size: 500 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

describe Optimizer::Relation::Materialized::EmptyOperand, '#optimizable?' do
  subject { object.optimizable? }

  let(:relation) { Relation.new([ [ :id, Integer ] ], body) }
  let(:object)   { described_class.new(relation)            }

  context 'with a body containing no entries' do
    let(:body) { [] }

    it { should be(true) }
  end

  context 'with a body containing an entry' do
    let(:body) { [ [ 1 ] ] }

    it { should be(false) }
  end
end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
axiom-optimizer-0.1.0 spec/unit/axiom/optimizer/relation/materialized/empty_operand/optimizable_predicate_spec.rb
veritas-optimizer-0.0.7 spec/unit/veritas/optimizer/relation/materialized/empty_operand/optimizable_spec.rb
veritas-optimizer-0.0.6 spec/unit/veritas/optimizer/relation/materialized/empty_operand/optimizable_spec.rb
veritas-optimizer-0.0.5 spec/unit/veritas/optimizer/relation/materialized/empty_operand/optimizable_spec.rb
veritas-optimizer-0.0.4 spec/unit/veritas/optimizer/relation/materialized/empty_operand/optimizable_spec.rb