Sha256: 5c919ec3cfedf974335a143b46e7e77542b736e6c0047701d3d1ebd2a71fff15

Contents?: true

Size: 658 Bytes

Versions: 20

Compression:

Stored size: 658 Bytes

Contents

describe Integer, "#untouchable?" do
  UNTOUCHABLE = [2,5,52,88,96,120,124,146,162,188,206,210,216,238,
                 246,248,262,268,276,288,290,292,304,306,322,324,
                 326,336,342,372,406,408,426,430,448,472,474,498,
                 516,518,520,530,540,552,556,562,576,584,612,624,
                 626,628,658]

  UNTOUCHABLE.first(5).each do |n|
    it "should return true for untouchable number #{n}" do
      n.should be_untouchable
    end
  end
    
  ((1..UNTOUCHABLE.last).to_a - UNTOUCHABLE).first(5).each do |n|
    it "should return false for non-untouchable number #{n}" do
      n.should_not be_untouchable
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
numb-0.186.0 spec/numb/untouchable_spec.rb
numb-0.185.0 spec/numb/untouchable_spec.rb
numb-0.184.0 spec/numb/untouchable_spec.rb
numb-0.181.0 spec/numb/untouchable_spec.rb
numb-0.170.0 spec/numb/untouchable_spec.rb
numb-0.152.0 spec/numb/untouchable_spec.rb
numb-0.138.0 spec/numb/untouchable_spec.rb
numb-0.125.0 spec/numb/untouchable_spec.rb
numb-0.114.0 spec/numb/untouchable_spec.rb
numb-0.111.0 spec/numb/untouchable_spec.rb
numb-0.109.0 spec/numb/untouchable_spec.rb
numb-0.99.0 spec/numb/untouchable_spec.rb
numb-0.96.0 spec/numb/untouchable_spec.rb
numb-0.89.0 spec/numb/untouchable_spec.rb
numb-0.84.0 spec/untouchable_spec.rb
numb-0.77.0 spec/untouchable_spec.rb
numb-0.72.1 spec/untouchable_spec.rb
numb-0.72.0 spec/untouchable_spec.rb
numb-0.68.0 spec/untouchable_spec.rb
numb-0.63.0 spec/untouchable_spec.rb