File: test_redcarpet.rb

package info (click to toggle)
jekyll 0.11.2-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 680 kB
  • sloc: ruby: 3,082; xml: 29; makefile: 5
file content (21 lines) | stat: -rw-r--r-- 574 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
require File.dirname(__FILE__) + '/helper'

class TestRedcarpet < Test::Unit::TestCase
  context "redcarpet" do
    setup do
      config = {
        'redcarpet' => { 'extensions' => ['smart'] },
        'markdown' => 'redcarpet'
      }
      @markdown = MarkdownConverter.new config
    end

    should "pass redcarpet options" do
      assert_equal "<h1>Some Header</h1>", @markdown.convert('# Some Header #').strip
    end
    
    should "pass redcarpet extensions" do
      assert_equal "<p>&quot;smart&quot;</p>", @markdown.convert('"smart"').strip
    end
  end
end