Sha256: 1c38055b9a9fdacd5d833284dc2a7a6f758ecf50e9a325bc1e86cfedf1648260

Contents?: true

Size: 520 Bytes

Versions: 5

Compression:

Stored size: 520 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

describe Optimizer::Algebra::Summarization::EmptyOperand, '.extension_default' do
  subject { object.extension_default(function) }

  let(:object) { described_class }

  context 'when the function has a default' do
    let(:operand)  { mock('Operand')               }
    let(:function) { Aggregate::Count.new(operand) }

    it { should eql(0) }
  end

  context 'when the function does not have a default' do
    let(:function) { proc {} }

    it { should be_nil }
  end
end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
axiom-optimizer-0.1.0 spec/unit/axiom/optimizer/algebra/summarization/empty_operand/class_methods/extension_default_spec.rb
veritas-optimizer-0.0.7 spec/unit/veritas/optimizer/algebra/summarization/empty_operand/class_methods/extension_default_spec.rb
veritas-optimizer-0.0.6 spec/unit/veritas/optimizer/algebra/summarization/empty_operand/class_methods/extension_default_spec.rb
veritas-optimizer-0.0.5 spec/unit/veritas/optimizer/algebra/summarization/empty_operand/class_methods/extension_default_spec.rb
veritas-optimizer-0.0.4 spec/unit/veritas/optimizer/algebra/summarization/empty_operand/class_methods/extension_default_spec.rb