Sha256: 35b13f38e4e7b6083714ce2bb7f3b76e1b3b37244a87bac1d00d4715842827a7

Contents?: true

Size: 372 Bytes

Versions: 3

Compression:

Stored size: 372 Bytes

Contents

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

describe Integer do
  it 'should respond to the new methods' do
    10.should respond_to(*%w(fact))
  end

  it 'should not calculate the factorial of negative numbers' do
    lambda { -10.fact }.should raise_error
  end

  it 'should return an Integer from factorial' do
    10.fact.should be_a_kind_of(Integer)
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

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