Sha256: 36da44683dd630ebee1a4ad4654e52f95dc419ad75cb8150a60db130de630582

Contents?: true

Size: 362 Bytes

Versions: 5

Compression:

Stored size: 362 Bytes

Contents

require_relative "../lib/tynn/erubis"

setup do
  Tynn.helpers(Tynn::Erubis, views: File.expand_path("./test/views"))

  Tynn::Test.new
end

test "escapes" do |app|
  Tynn.define do
    root do
      res.write(partial("partial", name: "<a></a>"))
    end
  end

  app = Tynn::Test.new
  app.get("/")

  assert_equal "&lt;a&gt;&lt;/a&gt;", app.res.body.strip
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
tynn-1.0.0.rc2 test/erubis_test.rb
tynn-1.0.0.rc1 test/erubis_test.rb
tynn-0.0.4 test/erubis_test.rb
tynn-0.0.3 test/erubis_test.rb
tynn-0.0.2 test/erubis.rb