Sha256: a81708b40484ca24e52daa29e9312acf9076d9583015022e6e8ebdb921c4094c

Contents?: true

Size: 411 Bytes

Versions: 2

Compression:

Stored size: 411 Bytes

Contents

require 'spec_helper'

describe SlodownPy, 'monkey patch for Kramdown::Converter::SlodownHtml#convert_codeblock' do
  it 'returns highlighted code from Pygments.rb' do
    formatter = Slodown::Formatter.new("~~~ ruby\n  puts foo\n~~~")
    result = formatter.complete.to_s
    result.should eql("<div class=\"highlight\"><pre><span class=\"nb\">puts</span> <span class=\"n\">foo</span>\n</pre></div>")
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
slodown.py-1.0.1 spec/convert_spec.rb
slodown.py-1.0.0 spec/convert_spec.rb