Start adding support for rack and sinatra

This commit is contained in:
Aslak Hellesøy 2008-10-13 14:56:13 +02:00
parent 33fdf33c89
commit 89d56fb5da
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