Skip to content

No default values, as nothing would be reasonable #268

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 25, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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