Sha256: 66d6496ce63b5ea706d6dcd9ed5c201a08304d025980048e537cf9a9e657ab93

Contents?: true

Size: 292 Bytes

Versions: 5

Compression:

Stored size: 292 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;/&#x27;'
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
roda-2.23.0 spec/plugin/h_spec.rb
roda-2.22.0 spec/plugin/h_spec.rb
roda-2.21.0 spec/plugin/h_spec.rb
roda-2.20.0 spec/plugin/h_spec.rb
roda-2.19.0 spec/plugin/h_spec.rb