Sha256: 15ebd277c1984dc34ca321f26fb0e50eb52653d190b9b9844292cde4724ae5a9
Contents?: true
Size: 520 Bytes
Versions: 16
Compression:
Stored size: 520 Bytes
Contents
describe Integer, "#carol?" do CAROL = [-1,7,47,223,959,3967,16127,65023,261119,1046527, 4190207,16769023,67092479,268402687,1073676287, 4294836223,17179607039,68718952447,274876858367, 1099509530623,4398042316799,17592177655807] it "returns true for Carol numbers" do CAROL.each do |number| number.should be_carol end end it "returns false for non-Carol numbers" do ((1..300).to_a - CAROL).each do |number| number.should_not be_carol end end end
Version data entries
16 entries across 16 versions & 1 rubygems