public
Description: Webrat - Ruby Acceptance Testing for Web applications
Homepage: http://gitrdoc.com/brynary/webrat/tree/master/
Clone URL: git://github.com/brynary/webrat.git
Allow accessing the request and response from SinatraSession
foca (author)
Sun Dec 28 19:40:14 -0800 2008
commit  6d108393be2b60b03ec5e5abb1bba3f97d79b885
tree    23c46ae91df224744a012ff0e35abab2cfd1074f
parent  2ead102f54f32a70b335e4303bd916791d73106f
...
5
6
7
 
 
8
9
10
11
12
 
13
14
15
...
5
6
7
8
9
10
11
12
13
 
14
15
16
17
0
@@ -5,11 +5,13 @@ require 'sinatra/test/methods'
0
 module Webrat
0
   class SinatraSession < RackSession #:nodoc:
0
     include Sinatra::Test::Methods
0
+    
0
+    attr_reader :request, :response
0
 
0
     %w(get head post put delete).each do |verb|
0
       define_method(verb) do |*args| # (path, data, headers = nil)
0
         path, data, headers = *args
0
-        params = data.merge({:env => headers || {}})
0
+        params = data.merge(:env => headers || {})
0
         self.__send__("#{verb}_it", path, params)
0
         get_it(@response.location, params) while @response.redirect?
0
       end

Comments