Class: Webrat::SinatraSession
- Inherits:
-
RackSession
- Object
- Session
- RackSession
- Webrat::SinatraSession
- Includes:
- Sinatra::Test
- Defined in:
- lib/webrat/sinatra.rb
Instance Attribute Summary collapse
-
#request ⇒ Object
readonly
Returns the value of attribute request.
Attributes inherited from Session
Instance Method Summary collapse
-
#initialize(context = nil) ⇒ SinatraSession
constructor
A new instance of SinatraSession.
- #response_body ⇒ Object
- #response_code ⇒ Object
Methods inherited from Session
#automate, #basic_auth, #check_for_infinite_redirects, #click_link_within, #current_dom, #current_page, #current_scope, #doc_root, #dom, #exception_caught?, #formatted_error, #header, #headers, #http_accept, #infinite_redirect_limit_exceeded?, #internal_redirect?, #page_scope, #redirect?, #redirected_to, #reload, #request_page, #scopes, #simulate, #success_code?, #visit, #within, #xml_content_type?
Methods included from SaveAndOpenPage
#doc_root, #open_in_browser, #rewrite_css_and_image_references, #save_and_open_page, #saved_page_dir
Methods included from Logging
Constructor Details
#initialize(context = nil) ⇒ SinatraSession
Returns a new instance of SinatraSession.
10 11 12 13 14 15 |
# File 'lib/webrat/sinatra.rb', line 10 def initialize(context = nil) super(context) app = context.respond_to?(:app) ? context.app : Sinatra::Application @browser = Sinatra::TestHarness.new(app) end |
Instance Attribute Details
#request ⇒ Object (readonly)
Returns the value of attribute request.
8 9 10 |
# File 'lib/webrat/sinatra.rb', line 8 def request @request end |