Sha256: 28092865a949e4dc00668af95906c2c52d01e41bd78509611fd09d5632de7bd5

Contents?: true

Size: 768 Bytes

Versions: 6

Compression:

Stored size: 768 Bytes

Contents

require File.dirname(__FILE__) + '/../spec_helper'

describe MarkdownFilter do
  it "should be named Markdown" do
    MarkdownFilter.filter_name.should == "Markdown"
  end

  it "should filter text according to Markdown rules" do
    MarkdownFilter.filter('**strong**').should =~ %r{<p><strong>strong</strong></p>}
  end

  it "should filter text with quotes into smart quotes" do
    MarkdownFilter.filter("# Radiant's \"filters\" rock!").should =~ %r{<h1>Radiant&(#8217|rsquo);s &(#8220|ldquo);filters&(#8221|rdquo); rock!</h1>}
  end
end

describe "<r:markdown>" do
  dataset :pages
  it "should filter its contents with Markdown" do
    pages(:home).should render("<r:markdown>* item</r:markdown>").matching(%r{<ul>\n(\s+)?<li>item<\/li>\n<\/ul>\n(\n)?})
  end
end

Version data entries

6 entries across 6 versions & 3 rubygems

Version Path
radiant-markdown_filter-extension-1.0.1 spec/models/markdown_filter_spec.rb
radiant-markdown_filter-extension-1.0.0 spec/models/markdown_filter_spec.rb
radiant-1.0.0.rc2 vendor/extensions/markdown_filter/spec/models/markdown_filter_spec.rb
radiant-1.0.0.rc1 vendor/extensions/markdown_filter/spec/models/markdown_filter_spec.rb
radiantcms-couchrest_model-0.1.4 vendor/extensions/markdown_filter/spec/models/markdown_filter_spec.rb
radiant-0.9.1 vendor/extensions/markdown_filter/spec/models/markdown_filter_spec.rb