Sha256: 85c8585fc93befa3b35e61ad0d46f4dd7be06410097360ff332de5575e82e1e7

Contents?: true

Size: 692 Bytes

Versions: 2

Compression:

Stored size: 692 Bytes

Contents

require File.expand_path("../../spec_helper", __FILE__)

describe SmartyPantsFilter do
  it "should be named SmartyPants" do
    SmartyPantsFilter.filter_name.should == "SmartyPants"
  end

  it "should filter text with quotes into smart quotes" do
    SmartyPantsFilter.filter("<h1 class=\"headline\">Radiant's \"filters\" rock!</h1>").should ==
      "<h1 class=\"headline\">Radiant&#8217;s &#8220;filters&#8221; rock!</h1>"
  end
end

describe "<r:smarty_pants>" do
  dataset :pages
  it "should filter its contents with SmartyPants" do
    pages(:home).should render('<r:smarty_pants>"A revolutionary quotation."</r:smarty_pants>').as("&#8220;A revolutionary quotation.&#8221;")
  end
end

Version data entries

2 entries across 2 versions & 2 rubygems

Version Path
radiant-1.0.0 ruby-debug/ruby/1.8/gems/radiant-smarty_pants_filter-extension-1.0.2/spec/models/smarty_pants_filter_spec.rb
radiant-smarty_pants_filter-extension-1.0.2 spec/models/smarty_pants_filter_spec.rb