Sha256: f190ba270a6165c0ebd427c4fa4d3a3edc40717b0778593e78e5ec68d52e6440

Contents?: true

Size: 668 Bytes

Versions: 12

Compression:

Stored size: 668 Bytes

Contents

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

begin
  require 'erubis'
  require 'tilt/erb'
  begin
    require 'tilt/erubis'
  rescue LoadError
    # Tilt 1 support
  end
rescue LoadError
  warn "tilt or erubis not installed, skipping _erubis_escaping plugin test"  
else
describe "_erubis_escaping plugin" do
  before do
    app(:bare) do
      plugin :render, :escape=>true

      route do |r|
        render(:inline=>'<%= "<>" %> <%== "<>" %><%= "<>" if false %>')
      end
    end
  end

  it "should escape inside <%= %> and not inside <%== %>, and handle postfix conditionals" do
    body.should == '&lt;&gt; <>'
  end
end
end

Version data entries

12 entries across 12 versions & 2 rubygems

Version Path
roda-2.1.0 spec/plugin/_erubis_escaping_spec.rb
roda-2.0.0 spec/plugin/_erubis_escaping_spec.rb
roda-1.3.0 spec/plugin/_erubis_escaping_spec.rb
roda-1.2.0 spec/plugin/_erubis_escaping_spec.rb
roda-1.1.0 spec/plugin/_erubis_escaping_spec.rb
roda-cj-1.0.5 spec/plugin/_erubis_escaping_spec.rb
roda-cj-1.0.4 spec/plugin/_erubis_escaping_spec.rb
roda-cj-1.0.3 spec/plugin/_erubis_escaping_spec.rb
roda-cj-1.0.2 spec/plugin/_erubis_escaping_spec.rb
roda-cj-1.0.1 spec/plugin/_erubis_escaping_spec.rb
roda-cj-1.0.0 spec/plugin/_erubis_escaping_spec.rb
roda-1.0.0 spec/plugin/_erubis_escaping_spec.rb