webrat/spec/integration/sinatra/modular_app.rb

16 lines
225 B
Ruby
Raw Normal View History

require "sinatra/base"
class MyModularApp < Sinatra::Default
get "/" do
"Hello World"
end
get "/redirect_absolute_url" do
redirect URI.join(request.url, "foo").to_s
end
get "/foo" do
"spam"
end
end