Sha256: 5328e543593677bd08701ede671783d43a754cf9db1fc83308276b9bac0650bb

Contents?: true

Size: 1.03 KB

Versions: 2

Compression:

Stored size: 1.03 KB

Contents

require 'spec_helper'

verify_without_span = lambda { |output|
   output.should == "<h3>Test</h3>\n<p>the WHO</p>"
}

verify_with_span = lambda { |output|
   output.should == "<h3>Test</h3>\n<p>the <span class=\"caps\">WHO</span></p>"
}

verify_empty = lambda { |output|
   output.should == ""
}

theories =
  [
    {
      :page => "textile-page.textile",
      :simple_name => "textile-page",
      :syntax => :textile,
      :extension => '.html',
      :matcher => verify_without_span
    },
    {
      :page => "textile-page.textile",
      :simple_name => "textile-page",
      :syntax => :textile,
      :extension => '.html',
      :matcher => verify_with_span,
      :site_overrides => { :textile => { :no_span_caps => false } }
    },
    {
      :page => "textile-empty-page.textile",
      :simple_name => "textile-empty-page",
      :syntax => :textile,
      :extension => '.html',
      :matcher => verify_empty
    }
  ]

describe Awestruct::Handlers::TiltHandler.to_s + "-Textile" do
  it_should_behave_like "a handler", theories
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
awestruct-0.5.4.rc3 spec/textile_handler_spec.rb
awestruct-0.5.4.rc2 spec/textile_handler_spec.rb