Sha256: 77639efa7fd5f9fdbedbfeb9ec0bb52d6d80a7c001a635e349143130c58fbb8d
Contents?: true
Size: 502 Bytes
Versions: 4
Compression:
Stored size: 502 Bytes
Contents
require 'spec_helper' require 'dm_ruby_extensions' describe Fixnum do describe 'factorial' do #------------------------------------------------------------------------------ it 'return the factorial of the number' do expect(5.factorial).to eq 120 expect(1.factorial).to eq 1 end end describe 'as_boolean' do specify { expect(1.as_boolean).to be_truthy } specify { expect(0.as_boolean).to be_falsey } specify { expect(20.as_boolean).to be_truthy } end end
Version data entries
4 entries across 4 versions & 1 rubygems