Sha256: 5861c6d68cced7cd818cd38418724a237c541c56c16d651a110547b7ed8ba4a9

Contents?: true

Size: 994 Bytes

Versions: 45

Compression:

Stored size: 994 Bytes

Contents

#!/usr/bin/env ruby
require 'minitest/autorun'
require_relative 'prime_factors'

class PrimeFactorsTest < Minitest::Test
  def test_1
    assert_equal [], PrimeFactors.for(1)
  end

  def test_2
    skip
    assert_equal [2], PrimeFactors.for(2)
  end

  def test_3
    skip
    assert_equal [3], PrimeFactors.for(3)
  end

  def test_4
    skip
    assert_equal [2, 2], PrimeFactors.for(4)
  end

  def test_6
    skip
    assert_equal [2, 3], PrimeFactors.for(6)
  end

  def test_8
    skip
    assert_equal [2, 2, 2], PrimeFactors.for(8)
  end

  def test_9
    skip
    assert_equal [3, 3], PrimeFactors.for(9)
  end

  def test_27
    skip
    assert_equal [3, 3, 3], PrimeFactors.for(27)
  end

  def test_625
    skip
    assert_equal [5, 5, 5, 5], PrimeFactors.for(625)
  end

  def test_901255
    skip
    assert_equal [5, 17, 23, 461], PrimeFactors.for(901_255)
  end

  def test_93819012551
    skip
    assert_equal [11, 9539, 894_119], PrimeFactors.for(93_819_012_551)
  end
end

Version data entries

45 entries across 45 versions & 1 rubygems

Version Path
trackler-2.1.0.12 tracks/ruby/exercises/prime-factors/prime_factors_test.rb
trackler-2.1.0.11 tracks/ruby/exercises/prime-factors/prime_factors_test.rb
trackler-2.1.0.10 tracks/ruby/exercises/prime-factors/prime_factors_test.rb
trackler-2.1.0.9 tracks/ruby/exercises/prime-factors/prime_factors_test.rb
trackler-2.1.0.8 tracks/ruby/exercises/prime-factors/prime_factors_test.rb