Skip to content

Instantly share code, notes, and snippets.

@tadman
Created June 11, 2009 18:25
Show Gist options
  • Select an option

  • Save tadman/128135 to your computer and use it in GitHub Desktop.

Select an option

Save tadman/128135 to your computer and use it in GitHub Desktop.
def test_parse_address
[
[ 'amy@amy.com', [ 'amy@amy.com', nil ] ],
[ 'bob@bob.com', [ 'bob@bob.com', nil ] ],
[ 'amy@test.com (Amy Test)', [ 'amy@test.com', nil ] ],
[ 'Bob Test <bob@bob.com>', [ 'bob@bob.com', 'Bob Test' ] ]
].each do |test_case|
assert_equal test_case[1], Message.parse_email_address(test_case[0])
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment