Sha256: f625d8acc6669b76a1adb79748cd664fa8cf9929e5a566738f4b4b5244d74f78

Contents?: true

Size: 521 Bytes

Versions: 1

Compression:

Stored size: 521 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.2.0 spec/unit/axiom/optimizer/algebra/summarization/empty_operand/class_methods/extension_default_spec.rb