Sha256: 207daa19d3843004e9c66c63cf17bfe4e0986c67c6751e42eb696e300828d271

Contents?: true

Size: 573 Bytes

Versions: 233

Compression:

Stored size: 573 Bytes

Contents

require 'minitest/autorun'
require_relative 'perfect_numbers'

class PerfectNumberTest < Minitest::Test
  def test_initialize_perfect_number
    assert_raises RuntimeError do
      PerfectNumber.classify(-1)
    end
  end

  def test_classify_deficient
    assert_equal 'deficient', PerfectNumber.classify(13)
  end

  def test_classify_perfect
    assert_equal 'perfect', PerfectNumber.classify(28)
  end

  def test_classify_abundant
    assert_equal 'abundant', PerfectNumber.classify(12)
  end

  def test_bookkeeping
    assert_equal 1, BookKeeping::VERSION
  end
end

Version data entries

233 entries across 233 versions & 1 rubygems

Version Path
trackler-2.2.1.38 tracks/ruby/exercises/perfect-numbers/perfect_numbers_test.rb
trackler-2.2.1.37 tracks/ruby/exercises/perfect-numbers/perfect_numbers_test.rb
trackler-2.2.1.36 tracks/ruby/exercises/perfect-numbers/perfect_numbers_test.rb
trackler-2.2.1.35 tracks/ruby/exercises/perfect-numbers/perfect_numbers_test.rb
trackler-2.2.1.34 tracks/ruby/exercises/perfect-numbers/perfect_numbers_test.rb
trackler-2.2.1.33 tracks/ruby/exercises/perfect-numbers/perfect_numbers_test.rb
trackler-2.2.1.32 tracks/ruby/exercises/perfect-numbers/perfect_numbers_test.rb
trackler-2.2.1.31 tracks/ruby/exercises/perfect-numbers/perfect_numbers_test.rb
trackler-2.2.1.30 tracks/ruby/exercises/perfect-numbers/perfect_numbers_test.rb
trackler-2.2.1.29 tracks/ruby/exercises/perfect-numbers/perfect_numbers_test.rb
trackler-2.2.1.28 tracks/ruby/exercises/perfect-numbers/perfect_numbers_test.rb
trackler-2.2.1.27 tracks/ruby/exercises/perfect-numbers/perfect_numbers_test.rb
trackler-2.2.1.26 tracks/ruby/exercises/perfect-numbers/perfect_numbers_test.rb
trackler-2.2.1.25 tracks/ruby/exercises/perfect-numbers/perfect_numbers_test.rb
trackler-2.2.1.24 tracks/ruby/exercises/perfect-numbers/perfect_numbers_test.rb
trackler-2.2.1.23 tracks/ruby/exercises/perfect-numbers/perfect_numbers_test.rb
trackler-2.2.1.22 tracks/ruby/exercises/perfect-numbers/perfect_numbers_test.rb
trackler-2.2.1.21 tracks/ruby/exercises/perfect-numbers/perfect_numbers_test.rb
trackler-2.2.1.20 tracks/ruby/exercises/perfect-numbers/perfect_numbers_test.rb
trackler-2.2.1.19 tracks/ruby/exercises/perfect-numbers/perfect_numbers_test.rb