Sha256: 22e015853ed2551e3beb2b01010fbf0d5557c4328ad96ff79a2bdd971b73c210

Contents?: true

Size: 558 Bytes

Versions: 11

Compression:

Stored size: 558 Bytes

Contents

describe Integer, "#amenable?" do
  # A100832
  @seq = [1,5,8,9,12,13,16,17,20,21,24,25,28,29,32,33,36,
          37,40,41,44,45,48,49,52,53,56,57,60,61,64,65,68,
          69,72,73,76,77,80,81,84,85,88,89,92,93,96,97,100,
          101,104,105,108,109,112,113,116,117,120,121,124,
          125,128,129,132]

  @seq.each do |n|
    it "returns true for amenable number #{n}" do
      n.should be_amenable
    end
  end

  @seq.to_seq.invert.each do |n|
    it "returns false for non-amenable number #{n}" do
      n.should_not be_amenable
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
numb-0.186.0 spec/numb/amenable_spec.rb
numb-0.185.0 spec/numb/amenable_spec.rb
numb-0.184.0 spec/numb/amenable_spec.rb
numb-0.181.0 spec/numb/amenable_spec.rb
numb-0.170.0 spec/numb/amenable_spec.rb
numb-0.152.0 spec/numb/amenable_spec.rb
numb-0.138.0 spec/numb/amenable_spec.rb
numb-0.125.0 spec/numb/amenable_spec.rb
numb-0.114.0 spec/numb/amenable_spec.rb
numb-0.111.0 spec/numb/amenable_spec.rb
numb-0.109.0 spec/numb/amenable_spec.rb