[rspec-devel] [ rspec-Feature Requests-6397 ] Support headers and session variables in http requests

noreply at rubyforge.org noreply at rubyforge.org
Sun Nov 18 20:37:47 EST 2007


Feature Requests item #6397, was opened at 2006-10-30 08:17
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=3152&aid=6397&group_id=797

Category: rails plugin
Group: None
>Status: Closed
Priority: 3
Submitted By: Jeff Dean (jefdean)
Assigned to: Nobody (None)
Summary: Support headers and session variables in http requests

Initial Comment:
[the following is a duplicate comment from one I posted on the mailing list because rubyforge logins were down for a while...]

I'd love to see better support for specifying headers headers and session variables to the http requests - something like:

_verb_(action, parameters=nil, session_vars=nil, headers=nil)

This way we could write:
get(:index, {:id=>1}, {:user=>@user}, {:accept=>'application/...'})

Or add some syntactic sugar such as:
get(:index, {}, {}, {:format=>:js})

to simulate xml/javascript/mobile device formats.

I'll start working on this shortly unless anyone else has the time to do it easily and quickly.

----------------------------------------------------------------------

Comment By: Chad Humphries (spicycode)
Date: 2007-11-19 01:35

Message:
Moved to http://rspec.lighthouseapp.com/projects/5645-rspec/tickets/22-6397-support-headers-and-session-variables-in-http-requests#ticket-22-2

----------------------------------------------------------------------

Comment By: Assaf Arkin (assaf)
Date: 2007-09-12 23:30

Message:
Sessions and headers would be a nice addition.

In controller specs, get/post/etc bypass CgiRequest which handles headers and content decoding, so if you want to specify the format, pass :format=>'json' as a parameter, not header.


----------------------------------------------------------------------

Comment By: Aslak Hellesøy (aslak_hellesoy)
Date: 2007-05-14 15:16

Message:
Noone has been working on it. Feel free to contribute a patch. 

Since I last commented on this issue RSpec no longer depends on zentest.

----------------------------------------------------------------------

Comment By: Douglas Tan (bianster)
Date: 2007-05-14 14:45

Message:
Has any progress been made regarding this? I'll like to help with implementing the feature.

----------------------------------------------------------------------

Comment By: Aslak Hellesøy (aslak_hellesoy)
Date: 2006-10-31 00:24

Message:
I don't think anyone is working on it. Make sure you submit specs too :-)
I haven't looked into the details, but you might actually have to patch zentest, since rspec on rails builds on it.

----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=3152&aid=6397&group_id=797


More information about the rspec-devel mailing list