Sha256: ec010ccdc7e9f6522ea93ebc8a3d852afb71b2a3a79f94c6486f86163cba80b9

Contents?: true

Size: 291 Bytes

Versions: 6

Compression:

Stored size: 291 Bytes

Contents

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

describe "h plugin" do 
  it "adds h method for html escaping" do
    app(:h) do |r|
      h("<form>") + h(:form) + h("test&<>/'")
    end

    body.must_equal '&lt;form&gt;formtest&amp;&lt;&gt;/&#39;'
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
roda-2.29.0 spec/plugin/h_spec.rb
roda-2.28.0 spec/plugin/h_spec.rb
roda-2.27.0 spec/plugin/h_spec.rb
roda-2.26.0 spec/plugin/h_spec.rb
roda-2.25.0 spec/plugin/h_spec.rb
roda-2.24.0 spec/plugin/h_spec.rb