Sha256: 0782639a10936147104a9180f56cb4312430cbd7e7fa95dd48007f8137d56d24

Contents?: true

Size: 915 Bytes

Versions: 10

Compression:

Stored size: 915 Bytes

Contents

require ::File.expand_path(
    ::File.join(::File.dirname(__FILE__), %w[.. .. spec_helper]))

# ---------------------------------------------------------------------------
describe 'Webby::Filters::Textile' do

  it 'should regsiter the textile filter handler' do
    Webby::Filters._handlers['textile'].should_not be_nil
  end

  if try_require('redcloth')

    it 'processes textile markup into HTML' do
      input = "p(foo). this is a paragraph of text"
      output = Webby::Filters._handlers['textile'].call(input)

      output.should == %q{<p class="foo">this is a paragraph of text</p>}
    end

  else

    it 'raises an error when RedCloth is used but not installed' do
      input = "p(foo). this is a paragraph of text"
      lambda {Webby::Filters._handlers['textile'].call(input)}.should raise_error(Webby::Error, "'RedCloth' must be installed to use the textile filter")
    end

  end
end

# EOF

Version data entries

10 entries across 10 versions & 8 rubygems

Version Path
TwP-webby-0.9.4.1 spec/webby/filters/textile_spec.rb
TwP-webby-0.9.4 spec/webby/filters/textile_spec.rb
blowmage-webby-0.9.4.1 spec/webby/filters/textile_spec.rb
dysinger-webby-0.9.4 spec/webby/filters/textile_spec.rb
francois-webby-0.9.4.1 spec/webby/filters/textile_spec.rb
giraffesoft-webby-0.9.5 spec/webby/filters/textile_spec.rb
mikker-webby-0.9.4 spec/webby/filters/textile_spec.rb
jamesgolick-webby-0.9.5 spec/webby/filters/textile_spec.rb
webby-0.9.4 spec/webby/filters/textile_spec.rb
webby-0.9.4-x86-mswin32 spec/webby/filters/textile_spec.rb