Sha256: 6b689851e05857323c8a8a9a0642cdf25656c7a523772a2605d7412a358e866f

Contents?: true

Size: 1.02 KB

Versions: 163

Compression:

Stored size: 1.02 KB

Contents

#!/usr/bin/env ruby
gem 'minitest', '>= 5.0.0'
require 'minitest/autorun'
require_relative 'sum_of_multiples'

class SumTest < Minitest::Test
  def test_sum_to_1
    assert_equal 0, SumOfMultiples.new(3, 5).to(1)
  end

  def test_sum_to_3
    skip
    assert_equal 3, SumOfMultiples.new(3, 5).to(4)
  end

  def test_sum_to_10
    skip
    assert_equal 23, SumOfMultiples.new(3, 5).to(10)
  end

  def test_sum_to_100
    skip
    assert_equal 2_318, SumOfMultiples.new(3, 5).to(100)
  end

  def test_sum_to_1000
    skip
    assert_equal 233_168, SumOfMultiples.new(3, 5).to(1000)
  end

  def test_configurable_7_13_17_to_20
    skip
    assert_equal 51, SumOfMultiples.new(7, 13, 17).to(20)
  end

  def test_configurable_4_6_to_15
    skip
    assert_equal 30, SumOfMultiples.new(4, 6).to(15)
  end

  def test_configurable_5_6_8_to_150
    skip
    assert_equal 4419, SumOfMultiples.new(5, 6, 8).to(150)
  end

  def test_configurable_43_47_to_10000
    skip
    assert_equal 2_203_160, SumOfMultiples.new(43, 47).to(10_000)
  end
end

Version data entries

163 entries across 163 versions & 1 rubygems

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