Sha256: 5e5f534ae91157068a80e8015d0835f5965a0f67ea11203e07c4c13b2b285bef

Contents?: true

Size: 670 Bytes

Versions: 4

Compression:

Stored size: 670 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

describe Function::Numeric::Unary, '#type' do
  subject { object.type }

  let(:described_class) { Class.new(Function::Numeric) { include Function::Numeric::Unary } }
  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/function/numeric/unary/type_spec.rb
veritas-0.0.6 spec/unit/veritas/function/numeric/unary/type_spec.rb
veritas-0.0.5 spec/unit/veritas/function/numeric/unary/type_spec.rb
veritas-0.0.4 spec/unit/veritas/function/numeric/unary/type_spec.rb