Class: Webrat::SinatraAdapter
- Inherits:
-
RackAdapter
- Object
- RackAdapter
- Webrat::SinatraAdapter
- Defined in:
- lib/webrat/sinatra.rb
Instance Method Summary collapse
-
#initialize(context) ⇒ SinatraAdapter
constructor
A new instance of SinatraAdapter.
Methods inherited from RackAdapter
#response, #response_body, #response_code
Constructor Details
#initialize(context) ⇒ SinatraAdapter
Returns a new instance of SinatraAdapter.
5 6 7 8 9 |
# File 'lib/webrat/sinatra.rb', line 5 def initialize(context) app = context.respond_to?(:app) ? context.app : Sinatra::Application super(Rack::Test::Session.new(Rack::MockSession.new(app, "www.example.com"))) end |