require 'text_utils/spec_helper' describe "Markdown" do include RSpec::TextUtilsHelper before do @processor = TextUtils::Markdown.new @options = {format: :markdown} end it_should_behave_like 'text processor' it "should not touch single underscores inside words" do process("foo_bar").should include("foo_bar") end it "should correctly guess links (from error)" do to_doc("http://some_domain.com http://some_domain.com").css('a').size == 2 end it "basic test" do text = <" do to_doc("foo\nbar").css('br').size.should == 1 end it "shouldn't create newline after > sign (from error)" do html = <text text HTML to_doc(html).css('br').size.should == 0 end it "shouldn't add empty

before first line (from error)" do process("texttext").should_not =~ /

\s*<\/p>/ end end end