Sha256: 202e2da734ddae35de01e71ea9c32a091b79461c507bcd846015f4ce4583e0d2

Contents?: true

Size: 247 Bytes

Versions: 30

Compression:

Stored size: 247 Bytes

Contents

require_relative "../spec_helper"

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

30 entries across 30 versions & 1 rubygems

Version Path
roda-3.9.0 spec/plugin/h_spec.rb
roda-3.8.0 spec/plugin/h_spec.rb
roda-3.7.0 spec/plugin/h_spec.rb
roda-3.6.0 spec/plugin/h_spec.rb
roda-3.5.0 spec/plugin/h_spec.rb
roda-3.4.0 spec/plugin/h_spec.rb
roda-3.3.0 spec/plugin/h_spec.rb
roda-3.2.0 spec/plugin/h_spec.rb
roda-3.1.0 spec/plugin/h_spec.rb
roda-3.0.0 spec/plugin/h_spec.rb