Skip to content

Commit

Permalink
No default values, as nothing would be reasonable
Browse files Browse the repository at this point in the history
fixes #267
Removes `to` method
  • Loading branch information
kotp committed Mar 25, 2016
1 parent 5997ebc commit a4baf60
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
4 changes: 0 additions & 4 deletions exercises/sum-of-multiples/example.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
class SumOfMultiples
def self.to(limit)
new(5, 3).to(limit)
end

attr_reader :multiples
def initialize(*multiples)
@multiples = multiples
Expand Down
10 changes: 5 additions & 5 deletions exercises/sum-of-multiples/sum_of_multiples_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,27 @@

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

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

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

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

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

def test_configurable_7_13_17_to_20
Expand Down

0 comments on commit a4baf60

Please sign in to comment.