Sha256: ca5389f9f20ea4e8c315bda6c58cd6075136970564b69150b034530cbef79679
Contents?: true
Size: 386 Bytes
Versions: 20
Compression:
Stored size: 386 Bytes
Contents
describe Integer, "#unitary_perfect?" do UNITARY_PERFECT = [6,60,90,87360,146361946186458562560000] UNITARY_PERFECT.first(4).each do |n| it "should return true for unitary perfect number #{n}" do n.should be_unitary_perfect end m = n + 7 it "should return false for non-unitary-perfect number #{m}" do m.should_not be_unitary_perfect end end end
Version data entries
20 entries across 20 versions & 1 rubygems