From da851881a745c24f7e05650e1eb40e3885fc6ae0 Mon Sep 17 00:00:00 2001 From: Dan Hansen Date: Sun, 2 Oct 2011 22:50:39 -0500 Subject: [PATCH] autolink spec should test that there is an A tag in the markdownified content and that it's href must equal the link that was posted instead of testing all of the markdownified content.. --- spec/helpers/markdownify_helper_spec.rb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/spec/helpers/markdownify_helper_spec.rb b/spec/helpers/markdownify_helper_spec.rb index 5422e3097..ed73c7d1b 100644 --- a/spec/helpers/markdownify_helper_spec.rb +++ b/spec/helpers/markdownify_helper_spec.rb @@ -24,7 +24,13 @@ describe MarkdownifyHelper do end it 'autolinks standard url links' do - markdownify("http://joindiaspora.com/").should match /

http:\/\/joindiaspora.com\/<\/a><\/p>/ + markdownified = markdownify("http://joindiaspora.com/") + + doc = Nokogiri.parse(markdownified) + + link = doc.css("a") + + link.attr("href").value.should == "http://joindiaspora.com/" end context 'when formatting status messages' do