Sha256: 84a2e3c996fc5c1502d3f6738be24e96851122e68a2818d91300cfe0f8ba33e6
Contents?: true
Size: 497 Bytes
Versions: 4
Compression:
Stored size: 497 Bytes
Contents
require 'test/unit' require 'iz' class TestHexadecimal < Test::Unit::TestCase def valid_emails ['johnotander@gmail.com', 'foo@bar.com', 'j+j@j.j'] end def invalid_emails [nil, false, -1, '', ' ', 'g', '123g', 'foo@', '@foo'] end def test_that_email_values_return_true valid_emails.each do |hex| assert Iz.email?(hex) end end def test_that_invalid_email_values_return_false invalid_emails.each do |hex| assert !Iz.email?(hex) end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
iz-0.3.1 | test/test_email.rb |
iz-0.3.0 | test/test_email.rb |
iz-0.2.1 | test/test_email.rb |
iz-0.2.0 | test/test_email.rb |