Sha256: 3f7b4fbe011cce61390eaf553c5015e6b322d0d508f953d7be215ff7d88fb705

Contents?: true

Size: 476 Bytes

Versions: 4

Compression:

Stored size: 476 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

describe Aggregate::Sum, '#type' do
  subject { object.type }

  let(:object)  { described_class.new(operand) }
  let(:operand) { mock('Unhandled')            }

  before do
    operand.stub!(:freeze).and_return(operand)
  end

  it 'delegates to Attribute.infer_type' do
    return_value = mock('Return Value')
    Attribute.should_receive(:infer_type).with(operand).and_return(return_value)
    should equal(return_value)
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
veritas-0.0.7 spec/unit/veritas/aggregate/sum/type_spec.rb
veritas-0.0.6 spec/unit/veritas/aggregate/sum/type_spec.rb
veritas-0.0.5 spec/unit/veritas/aggregate/sum/type_spec.rb
veritas-0.0.4 spec/unit/veritas/aggregate/sum/type_spec.rb