Sha256: 5c3bcce41b4344dd43f807cb5588e67977cf65d061d992213b660eee1505ec43

Contents?: true

Size: 755 Bytes

Versions: 15

Compression:

Stored size: 755 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<li>item </li>\n</ul>})
  end
end

Version data entries

15 entries across 15 versions & 2 rubygems

Version Path
radiantcms-couchrest_model-0.2.4 vendor/extensions/markdown_filter/spec/models/markdown_filter_spec.rb
radiantcms-couchrest_model-0.2.2 vendor/extensions/markdown_filter/spec/models/markdown_filter_spec.rb
radiantcms-couchrest_model-0.2.1 vendor/extensions/markdown_filter/spec/models/markdown_filter_spec.rb
radiantcms-couchrest_model-0.2 vendor/extensions/markdown_filter/spec/models/markdown_filter_spec.rb
radiantcms-couchrest_model-0.1.9 vendor/extensions/markdown_filter/spec/models/markdown_filter_spec.rb
radiantcms-couchrest_model-0.1.8 vendor/extensions/markdown_filter/spec/models/markdown_filter_spec.rb
radiantcms-couchrest_model-0.1.7 vendor/extensions/markdown_filter/spec/models/markdown_filter_spec.rb
radiantcms-couchrest_model-0.1.6 vendor/extensions/markdown_filter/spec/models/markdown_filter_spec.rb
radiantcms-couchrest_model-0.1.5 vendor/extensions/markdown_filter/spec/models/markdown_filter_spec.rb
radiant-0.7.2 vendor/extensions/markdown_filter/spec/models/markdown_filter_spec.rb
radiant-0.8.2 vendor/extensions/markdown_filter/spec/models/markdown_filter_spec.rb
radiant-0.8.1 vendor/extensions/markdown_filter/spec/models/markdown_filter_spec.rb
radiant-0.7.0 vendor/extensions/markdown_filter/spec/models/markdown_filter_spec.rb
radiant-0.8.0 vendor/extensions/markdown_filter/spec/models/markdown_filter_spec.rb
radiant-0.7.1 vendor/extensions/markdown_filter/spec/models/markdown_filter_spec.rb