Start adding support for rack and sinatra

This commit is contained in:
Aslak Hellesøy 2008-10-13 14:56:13 +02:00 committed by Bryan Helmkamp
parent 50a4c1bc79
commit 1db6f70f5b
2 changed files with 26 additions and 0 deletions

View File

@ -0,0 +1,13 @@
require 'webrat'
module Webrat
class RackSession < Session
def response_body
@response.body
end
def response_code
@response.status
end
end
end

View File

@ -0,0 +1,13 @@
require 'webrat/rack/rack_session'
require 'sinatra'
require 'sinatra/test/methods'
module Webrat
class SinatraSession < RackSession
include Sinatra::Test::Methods
def get(*args)
get_it(*args)
end
end
end