Sha256: 867a082a1565fcd22bf5093ba992a691e701f248747b8330da0defd0d136af3c

Contents?: true

Size: 600 Bytes

Versions: 163

Compression:

Stored size: 600 Bytes

Contents

gem 'minitest', '>= 5.0.0'
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

163 entries across 163 versions & 1 rubygems

Version Path
trackler-2.1.0.7 tracks/ruby/exercises/perfect-numbers/perfect_numbers_test.rb
trackler-2.1.0.6 tracks/ruby/exercises/perfect-numbers/perfect_numbers_test.rb
trackler-2.1.0.5 tracks/ruby/exercises/perfect-numbers/perfect_numbers_test.rb
trackler-2.1.0.4 tracks/ruby/exercises/perfect-numbers/perfect_numbers_test.rb
trackler-2.1.0.3 tracks/ruby/exercises/perfect-numbers/perfect_numbers_test.rb
trackler-2.1.0.2 tracks/ruby/exercises/perfect-numbers/perfect_numbers_test.rb
trackler-2.1.0.1 tracks/ruby/exercises/perfect-numbers/perfect_numbers_test.rb
trackler-2.1.0.0 tracks/ruby/exercises/perfect-numbers/perfect_numbers_test.rb
trackler-2.0.8.55 tracks/ruby/exercises/perfect-numbers/perfect_numbers_test.rb
trackler-2.0.8.54 tracks/ruby/exercises/perfect-numbers/perfect_numbers_test.rb
trackler-2.0.8.53 tracks/ruby/exercises/perfect-numbers/perfect_numbers_test.rb
trackler-2.0.8.52 tracks/ruby/exercises/perfect-numbers/perfect_numbers_test.rb
trackler-2.0.8.51 tracks/ruby/exercises/perfect-numbers/perfect_numbers_test.rb
trackler-2.0.8.50 tracks/ruby/exercises/perfect-numbers/perfect_numbers_test.rb
trackler-2.0.8.49 tracks/ruby/exercises/perfect-numbers/perfect_numbers_test.rb
trackler-2.0.8.48 tracks/ruby/exercises/perfect-numbers/perfect_numbers_test.rb
trackler-2.0.8.47 tracks/ruby/exercises/perfect-numbers/perfect_numbers_test.rb
trackler-2.0.8.46 tracks/ruby/exercises/perfect-numbers/perfect_numbers_test.rb
trackler-2.0.8.45 tracks/ruby/exercises/perfect-numbers/perfect_numbers_test.rb
trackler-2.0.8.44 tracks/ruby/exercises/perfect-numbers/perfect_numbers_test.rb