Sha256: c75bdc91b5c7fc6120b88c30d6344d885dd6b3a095da2202ed839b7d4ee227bc
Contents?: true
Size: 896 Bytes
Versions: 4
Compression:
Stored size: 896 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_phone_number('+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_phone_number('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_phone_number('') end end
Version data entries
4 entries across 4 versions & 1 rubygems