diff --git a/test/test_tags.rb b/test/test_tags.rb index f1fb9c4c..0f12f7ad 100644 --- a/test/test_tags.rb +++ b/test/test_tags.rb @@ -452,48 +452,30 @@ CONTENT end end + context "with fenced code blocks with backticks" do - context "with maruku and fenced code blocks with backticks" do - + # setup do + # @config = { + # 'markdown' => 'maruku', + # 'maruku' => { + # 'fenced_code_blocks' => true + # } + # } + # end setup do - @config = { - 'markdown' => 'maruku', - 'maruku' => { - 'fenced_code_blocks' => true - } - } - end - - context "with pygments enabled" do - setup do - @markdown = Converters::Markdown.new @config.merge({ 'pygments' => true }) - end - - should "render fenced code blocks with syntax highlighting" do - assert_equal "
puts "Hello world"\n
", @markdown.convert( - <<-EOS + content = < {'fenced_code_blocks' => true}} + ) end - context "with pygments disabled" do - setup do - @markdown = Converters::Markdown.new @config.merge({ 'pygments' => false }) - end - - should "render fenced code blocks without syntax highlighting" do - assert_equal "
\nputs "Hello world"\n
", @markdown.convert( - <<-EOS -```ruby -puts "Hello world" -``` - EOS - ).strip - end + # todo: if #112 is merged into maruku, update to remove the newlines inside code block + should "render fenced code blocks" do + assert_match %r{
\nputs "Hello world"\n
}, @result.strip end end