Sha256: 85ddaf2668243aba97f46e42b899858fd8b6b6273a9e6af52fe8c3dffad124f3

Contents?: true

Size: 602 Bytes

Versions: 3

Compression:

Stored size: 602 Bytes

Contents

require './test/sinatra_baseapp'
require 'test/unit'
require 'rack/test'

class SintraStaticAssetsXHTMLTest < Test::Unit::TestCase
  include Rack::Test::Methods

  def app
    Sinatra::XHTML.new
  end

  def test_image_tag_closes
    get '/image_tag'
    assert last_response.ok?
    assert_equal last_response.body, "<img src=\"/images/foo.jpg\"/>"
  end

  def test_link_tag_closes
    get '/link_tag'
    assert last_response.ok?
    assert_equal last_response.body,
      "<link charset=\"utf-8\" href=\"/stylesheets/winter.css\" media=\"screen\" rel=\"stylesheet\" type=\"text/css\"/>"
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
sinatra-static-assets-1.0.2 test/sinatra_static_assets_xhtml_test.rb
sinatra-static-assets-1.0.1 test/sinatra_static_assets_xhtml_test.rb
sinatra-static-assets-1.0.0 test/sinatra_static_assets_xhtml_test.rb