Sha256: 0e17ffa1dc52eb8f01c298f49cd8c58cc10478571c57016aa6c8d75f2a555b0d
Contents?: true
Size: 1.43 KB
Versions: 1
Compression:
Stored size: 1.43 KB
Contents
require 'spec_helper' module RevealCK module Markdown describe SlideMarkdown, '#postprocess' do let :slide_markdown do SlideMarkdown.new end let :basic_input do <<-eos <h1>First Slide</h1> <hr> <h1>Second Slide</h1> eos end let :leading_hr_input do <<-eos <hr> <h1>First Slide</h1> <hr> <h1>Second Slide</h1> eos end let :trailing_hr_input do <<-eos <h1>First Slide</h1> <hr> <h1>Second Slide</h1> <hr> eos end it 'prepends an opening "<section>"' do output = slide_markdown.postprocess(basic_input) output.should start_with '<section>' end it 'appends a closing "</section>"' do output = slide_markdown.postprocess(basic_input) output.should end_with '</section>' end it 'replaces "<hr>"s with section breaks' do output = slide_markdown.postprocess(basic_input) output.should include '<h1>First Slide</h1>' output.should include "</section>\n<section>" output.should include '<h1>Second Slide</h1>' end it 'trims off an initial <hr>' do output = slide_markdown.postprocess(leading_hr_input) output.should_not start_with "<section>\n</section>" end it 'trims off a trailing <hr>' do output = slide_markdown.postprocess(trailing_hr_input) output.should_not =~ /<section>\s*<\/section>/m end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
reveal-ck-0.3.0 | spec/lib/reveal-ck/markdown/slide_markdown_spec.rb |