Sha256: d431d75c76617db0d0ecda4b331db67b640cf5b8064f5721635f784a7433c3e6

Contents?: true

Size: 974 Bytes

Versions: 188

Compression:

Stored size: 974 Bytes

Contents

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

188 entries across 188 versions & 1 rubygems

Version Path
trackler-2.2.1.180 tracks/ruby/exercises/prime-factors/prime_factors_test.rb
trackler-2.2.1.179 tracks/ruby/exercises/prime-factors/prime_factors_test.rb
trackler-2.2.1.178 tracks/ruby/exercises/prime-factors/prime_factors_test.rb
trackler-2.2.1.177 tracks/ruby/exercises/prime-factors/prime_factors_test.rb
trackler-2.2.1.176 tracks/ruby/exercises/prime-factors/prime_factors_test.rb
trackler-2.2.1.175 tracks/ruby/exercises/prime-factors/prime_factors_test.rb
trackler-2.2.1.174 tracks/ruby/exercises/prime-factors/prime_factors_test.rb
trackler-2.2.1.173 tracks/ruby/exercises/prime-factors/prime_factors_test.rb
trackler-2.2.1.172 tracks/ruby/exercises/prime-factors/prime_factors_test.rb
trackler-2.2.1.171 tracks/ruby/exercises/prime-factors/prime_factors_test.rb
trackler-2.2.1.170 tracks/ruby/exercises/prime-factors/prime_factors_test.rb
trackler-2.2.1.169 tracks/ruby/exercises/prime-factors/prime_factors_test.rb
trackler-2.2.1.167 tracks/ruby/exercises/prime-factors/prime_factors_test.rb
trackler-2.2.1.166 tracks/ruby/exercises/prime-factors/prime_factors_test.rb
trackler-2.2.1.165 tracks/ruby/exercises/prime-factors/prime_factors_test.rb
trackler-2.2.1.164 tracks/ruby/exercises/prime-factors/prime_factors_test.rb
trackler-2.2.1.163 tracks/ruby/exercises/prime-factors/prime_factors_test.rb
trackler-2.2.1.162 tracks/ruby/exercises/prime-factors/prime_factors_test.rb
trackler-2.2.1.161 tracks/ruby/exercises/prime-factors/prime_factors_test.rb
trackler-2.2.1.160 tracks/ruby/exercises/prime-factors/prime_factors_test.rb