1
0
Fork 0
mirror of https://github.com/TheAlgorithms/Ruby synced 2025-01-26 19:58:01 +01:00
TheAlgorithms-Ruby/maths/abs_test.rb
2021-01-08 17:14:52 -05:00

18 lines
306 B
Ruby

# frozen_string_literal: true
require 'minitest/autorun'
require_relative './abs'
class AbsTest < Minitest::Test
def test_positive_number
assert_equal Abs.call(4), 4
end
def test_zero
assert_equal Abs.call(0), 0
end
def test_negative_number
assert_equal Abs.call(-9), 9
end
end