Sha256: 107597acc84577d423caef3ae1c3240e4909c404abce7e10f99e5a1114aa4e72

Contents?: true

Size: 678 Bytes

Versions: 1

Compression:

Stored size: 678 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 => operand, :frozen? => true)
  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

1 entries across 1 versions & 1 rubygems

Version Path
axiom-0.1.0 spec/unit/axiom/function/numeric/unary/type_spec.rb