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, < '/bar' assert last_response.ok? assert_equal last_response.body, < 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"