Permalink
Browse files

test for autolinker

  • Loading branch information...
rekado committed Jun 11, 2012
1 parent 4251055 commit 5fd0d5727727ffa366b58821c6f546277a0082c9
Showing with 7 additions and 0 deletions.
  1. +7 −0 spec/render.rb
View
@@ -13,5 +13,12 @@
it 'should not strip tags in code blocks' do
subject.render('`<span>tag soup</span>`').should =~ /&lt;span&gt;tag soup&lt;\/span&gt;/
end
+
+ it 'should autolink URLs' do
+ subject.render('http://nice.com').should =~ %r{<a href='http://nice.com'>http://nice.com</a>}
+ subject.render('hello http://nice.com').should =~ %r{hello <a href='http://nice.com'>http://nice.com</a>}
+ subject.render('This is a link:\n\nhttp://nice.com').should =~ %r{<a href='http://nice.com'>http://nice.com</a>}
+ end
+
end
end

0 comments on commit 5fd0d57

Please sign in to comment.