Sha256: 25cf63559b4fb56ec0338b6cdc52c58ab21bf451a3a7c5083af01fa95de3134a

Contents?: true

Size: 520 Bytes

Versions: 1

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)  { double('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

1 entries across 1 versions & 1 rubygems

Version Path
axiom-optimizer-0.1.1 spec/unit/axiom/optimizer/algebra/summarization/empty_operand/class_methods/extension_default_spec.rb