Class: Webrat::MerbAdapter

Inherits:
RackAdapter show all
Defined in:
lib/webrat/adapters/merb.rb

Overview

:nodoc:

Instance Attribute Summary

Attributes inherited from RackAdapter

#session

Instance Method Summary collapse

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