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 = <
before first line (from error)" do process("texttext").should_not =~ /
\s*<\/p>/ end end end