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