Sha256: 216b41a2c6048e8e51832a73d39bdd0cc6467563af457e77ca8a97395c0038a4

Contents?: true

Size: 799 Bytes

Versions: 11

Compression:

Stored size: 799 Bytes

Contents

require File.join(File.dirname(__FILE__), '..', 'spec_helper')

describe HtmlEmailCreator::Formatter do
  describe "Markdown" do
    let(:md) { HtmlEmailCreator::Formatters::Markdown.id }
    
    it "should convert correctly" do
      HtmlEmailCreator::Formatter.new("**I am strong**").find(md).format.should eql("<p><strong>I am strong</strong></p>")
    end

    it "should not support Kramdowns table extension, since it is not compatible with Liquid filters" do
      markdown = <<-eos
| First | Second | Third |
|:------|:-------|:------|
| 1     | 2      | 3     |
      eos

      html = <<eos
<p>| First | Second | Third |
|:------|:-------|:------|
| 1     | 2      | 3     |</p>
eos

      HtmlEmailCreator::Formatter.new(markdown).find(md).format.should eql(html.strip)
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
html_email_creator-1.0.18 spec/html_email_creator/formatter_spec.rb
html_email_creator-1.0.16 spec/html_email_creator/formatter_spec.rb
html_email_creator-1.0.15 spec/html_email_creator/formatter_spec.rb
html_email_creator-1.0.14 spec/html_email_creator/formatter_spec.rb
html_email_creator-1.0.13 spec/html_email_creator/formatter_spec.rb
html_email_creator-1.0.10 spec/html_email_creator/formatter_spec.rb
html_email_creator-1.0.9 spec/html_email_creator/formatter_spec.rb
html_email_creator-1.0.8 spec/html_email_creator/formatter_spec.rb
html_email_creator-1.0.7 spec/html_email_creator/formatter_spec.rb
html_email_creator-1.0.6 spec/html_email_creator/formatter_spec.rb
html_email_creator-1.0.5 spec/html_email_creator/formatter_spec.rb