Sha256: 71471b970cb1f3f73d13f1bb9ec14582e1edba8751d26006b37935f0eb28f987

Contents?: true

Size: 1.06 KB

Versions: 29

Compression:

Stored size: 1.06 KB

Contents

require 'spec_helper'
require 'haml/filters/textile'

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

29 entries across 29 versions & 1 rubygems

Version Path
awestruct-0.6.7 spec/awestruct/handlers/textile_handler_spec.rb
awestruct-0.6.6 spec/awestruct/handlers/textile_handler_spec.rb
awestruct-0.6.5 spec/awestruct/handlers/textile_handler_spec.rb
awestruct-0.6.4 spec/awestruct/handlers/textile_handler_spec.rb
awestruct-0.6.3 spec/awestruct/handlers/textile_handler_spec.rb
awestruct-0.6.2 spec/awestruct/handlers/textile_handler_spec.rb
awestruct-0.6.1 spec/awestruct/handlers/textile_handler_spec.rb
awestruct-0.6.0 spec/awestruct/handlers/textile_handler_spec.rb
awestruct-0.6.0.RC1 spec/awestruct/handlers/textile_handler_spec.rb
awestruct-0.6.0.alpha4 spec/awestruct/handlers/textile_handler_spec.rb
awestruct-0.6.0.alpha3 spec/awestruct/handlers/textile_handler_spec.rb
awestruct-0.6.0.alpha1 spec/awestruct/handlers/textile_handler_spec.rb
awestruct-0.5.7 spec/awestruct/handlers/textile_handler_spec.rb
awestruct-0.5.7.RC2 spec/awestruct/handlers/textile_handler_spec.rb
awestruct-0.5.7.RC1 spec/awestruct/handlers/textile_handler_spec.rb
awestruct-0.5.6 spec/awestruct/handlers/textile_handler_spec.rb
awestruct-0.5.6.beta9 spec/awestruct/handlers/textile_handler_spec.rb
awestruct-0.5.6.beta8 spec/awestruct/handlers/textile_handler_spec.rb
awestruct-0.5.6.beta7 spec/awestruct/handlers/textile_handler_spec.rb
awestruct-0.5.6.beta6 spec/awestruct/handlers/textile_handler_spec.rb