Sha256: 637f9656178b0232aed337e1784e0b8fec6122459992b2d2e03e161e6ebd36d5
Contents?: true
Size: 947 Bytes
Versions: 1
Compression:
Stored size: 947 Bytes
Contents
require 'sinatra_app' require 'test/unit' require 'rack/test' set :environment, :test class SintraStaticAssetsTest < Test::Unit::TestCase include Rack::Test::Methods def app Sinatra::Application end def test_url_for_returns_absolute_paths_and_full_urls get '/url_for', {}, 'SCRIPT_NAME' => '/bar' assert last_response.ok? assert_equal last_response.body, <<EOD /bar/ /bar/foo http://example.org/bar/foo EOD end def test_image_tag_returns_absolute_paths_and_full_urls get '/image_tag', {}, 'SCRIPT_NAME' => '/bar' assert last_response.ok? assert_equal last_response.body, <<EOD <img alt="[foo image]" src="/bar/images/foo.jpg"> EOD end end __END__ stylesheet_link_tag "/stylesheets/screen.css", "/stylesheets/summer.css", :media => "projection" javascript_script_tag "/javascripts/jquery.js", "/javascripts/summer.js", :charset => "iso-8859-2" link_to "Tatry Mountains Rescue Team", "/topr"
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
wbzyl-sinatra-static-assets-0.1.6 | test/sinatra_static_assets_test.rb |