File: test_include.rb

package info (click to toggle)
ruby-slim 5.2.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 828 kB
  • sloc: ruby: 5,583; makefile: 12
file content (16 lines) | stat: -rw-r--r-- 471 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
require 'slim/include'

require_relative 'helper.rb'

begin
  class SlimTest < Minitest::Test
    it 'renders .slim files includes with js embed' do
      slim_app { slim :embed_include_js }
      assert ok?
      assert_equal "<!DOCTYPE html><html><head><title>Slim Examples</title><script>alert('Slim supports embedded javascript!')</script></head><body><footer>Slim</footer></body></html>", body
    end

  end
rescue LoadError
  warn "#{$!}: skipping slim tests"
end