Start adding support for rack and sinatra
This commit is contained in:
parent
50a4c1bc79
commit
1db6f70f5b
13
lib/webrat/rack/rack_session.rb
Normal file
13
lib/webrat/rack/rack_session.rb
Normal 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
|
13
lib/webrat/sinatra/sinatra_session.rb
Normal file
13
lib/webrat/sinatra/sinatra_session.rb
Normal 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
|
Loading…
Reference in New Issue
Block a user