Sha256: c72f8b256faa14819a67d0f76107bfcc7f50bfc86a9e349b2dff4c3812614585

Contents?: true

Size: 222 Bytes

Versions: 36

Compression:

Stored size: 222 Bytes

Contents

describe Integer, "#digital_sum" do
  it "returns the sum of the digits of self" do
    1.digital_sum.should == 1
    10.digital_sum.should == 1
    22.digital_sum.should == 4
    282761.digital_sum.should == 26
  end
end

Version data entries

36 entries across 36 versions & 1 rubygems

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