Class: Webrat::SinatraAdapter
- Inherits:
-
RackAdapter
- Object
- RackAdapter
- Webrat::SinatraAdapter
- Defined in:
- lib/webrat/adapters/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.
3 4 5 6 7 |
# File 'lib/webrat/adapters/sinatra.rb', line 3 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 |