Sha256: c45cd7103f934dbea1d45de16f63db05d25a0cc37437a4620bfc7ae26682772a
Contents?: true
Size: 856 Bytes
Versions: 7
Compression:
Stored size: 856 Bytes
Contents
require 'test/unit' require 'phone_number_validator' ## # This class respresents 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 (949) 355-6244 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 expectst the output to be <b>nil</b> def test_no_phone_number assert_equal :nil, PhoneNumberValidator.validate('') end end
Version data entries
7 entries across 7 versions & 1 rubygems