Sha256: 40273c0daea935cff42f863766cb0911967951ec32793d61478abe92a7cba200
Contents?: true
Size: 822 Bytes
Versions: 9
Compression:
Stored size: 822 Bytes
Contents
require 'test/unit' require 'phone_number_validator' ## # This class represents the testing-unit for this gem app # # <b>Inherits from:</b> # Test::Unit::TestCase class PhoneNumberValidatorTest < Test::Unit::TestCase ## # This test inputs a valid phone number and expects the output to be <b>true</b> def test_valid_phone_number assert_equal true, PhoneNumberValidator.validate('+1 (987) 654-3210 ext. 198842') end ## # This test inputs an invalid phone number and expects the output to be <b>false</b> def test_invalid_phone_number assert_equal false, PhoneNumberValidator.validate('94643823637337') end ## # This test inputs no phone number and expects the output to be <b>nil</b> def test_no_phone_number assert_equal nil, PhoneNumberValidator.validate('') end end
Version data entries
9 entries across 9 versions & 1 rubygems