Sha256: 0953ba0b321b211bc8fd596a6493ec67739c2760a67cb379bc1c55d5210d32a0

Contents?: true

Size: 446 Bytes

Versions: 3

Compression:

Stored size: 446 Bytes

Contents

require File.dirname(__FILE__) + '/spec_helper'

describe Numeric do
  it 'should respond to the new methods' do
    [10,10.5].each do |num|
      num.should respond_to(*%w(square cube sqrt root ln log))
    end
  end

  it 'should return Numeric from most new methods' do
    %w(square cube sqrt root ln log).each do |method|
      [10,10.5].each do |num|
        num.send(method.intern).should be_a_kind_of(Numeric)
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
darkhelmet-darkext-0.11.0 spec/numeric_spec.rb
darkhelmet-darkext-0.11.1 spec/numeric_spec.rb
darkhelmet-darkext-0.11.2 spec/numeric_spec.rb