Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

33 lines (25 sloc) 0.811 kb
require 'test/unit'
require './fizzbuzz'
class AssertionsTest < Test::Unit::TestCase
def test_should_return_one_when_one_is_given
assert FizzBuzz.answer(1) == 1
end
def test_should_return_two_when_two_is_given
assert FizzBuzz.answer(2) == 2
end
def test_should_return_fizz_when_three_is_given
assert FizzBuzz.answer(3) == 'fizz'
end
def test_should_return_buzz_when_five_is_given
assert FizzBuzz.answer(5) == 'buzz'
end
def test_should_return_fizz_when_a_multiple_of_three_is_given
assert FizzBuzz.answer(6) == 'fizz'
end
def test_should_return_buzz_when_a_multiple_of_five_is_given
assert FizzBuzz.answer(10) == 'buzz'
end
def test_should_return_fizzbuzz_when_a_multiple_of_three_and_five_is_given
assert FizzBuzz.answer(15) == 'fizzbuzz'
end
end
Jump to Line
Something went wrong with that request. Please try again.