File: test_kramdown.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 (23 lines) | stat: -rw-r--r-- 596 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
22
23
require 'helper'

class TestKramdown < Test::Unit::TestCase
  context "kramdown" do
    setup do
      config = {
        'markdown' => 'kramdown',
        'kramdown' => {
          'auto_ids'      => false,
          'footnote_nr'   => 1,
          'entity_output' => 'as_char',
          'toc_levels'    => '1..6'
        }
      }
      @markdown = MarkdownConverter.new config
    end

    # http://kramdown.rubyforge.org/converter/html.html#options
    should "pass kramdown options" do
      assert_equal "<h1>Some Header</h1>", @markdown.convert('# Some Header #').strip
    end
  end
end