assert_equal%(My pic: <a href="#{pic}"><img src="#{pic}" width="160px"></a> -- full album here #{generate_result(url)}),auto_link("My pic: #{pic} -- full album here #{url}"){|link|
iflink=~/\.(jpg|gif|png|bmp|tif)$/i
raw%(<img src="#{link}" width="160px">)
else
link
end
}
end
deftest_auto_link_with_options_hash
assert_dom_equal'Welcome to my new blog at <a href="http://www.myblog.com/" class="menu" target="_blank">http://www.myblog.com/</a>. Please e-mail me at <a href="mailto:me@email.com" class="menu" target="_blank">me@email.com</a>.',
auto_link("Welcome to my new blog at http://www.myblog.com/. Please e-mail me at me@email.com.",