[rspec-devel] [ rspec-Feature Requests-8509 ] Enhance controller docs

noreply at rubyforge.org noreply at rubyforge.org
Sun Nov 18 21:13:20 EST 2007


Feature Requests item #8509, was opened at 2007-02-08 09:13
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=3152&aid=8509&group_id=797

Category: None
Group: None
Status: Open
Priority: 3
Submitted By: Jerry West (jjw)
Assigned to: Nobody (None)
Summary: Enhance controller docs 

Initial Comment:
The controller spec docs assume some familiarity with Rails unit testing concepts . This assumption is increasingly in-appropriate as newcomers to Rails start with RSpec as their prefered development 'test' tool.

An immediate request is to update the controller specs documentation to include something like this:

Triggering controller actions

Once the expectations have been established, the controller action must be invoked.  Three helper routines are provided to emulate the HTTP GET and POST expected by the controller:

  get :action, [params]

  post :action, params

  xhr :get, :action, [params]
 
  xhr :post, :action, params

The #xhr method emulates an AJAX (xml_http_request) call.  

'params' is a hash to be placed in the params[] accessor in the controller (e.g. :id => 99, :name => 'fred', etc).  The 'action' can be either a symbol or a string.



-------

The example at the end might also be enhanced to illustrate usage.

  xhr :post, :update, :id => 3, :name => 'fred'



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

Comment By: Chad Humphries (spicycode)
Date: 2007-11-18 21:13

Message:
Moved to http://rspec.lighthouseapp.com/projects/5645-rspec/tickets/34-8509-enhance-controller-docs#ticket-34-2

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

Comment By: David Chelimsky (dchelimsky)
Date: 2007-02-27 23:03

Message:
I'm inclined to reference the rails test docs rather than duplicating them in RSpec. WDYT?

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

Comment By: David Chelimsky (dchelimsky)
Date: 2007-02-08 13:24

Message:
When I created the Documentation tracker it looks like it got created as "not publicly available". Furthermore it seems that there is a bug already submitted to Rubyforge that you can't set it to public once it is set private.

http://rubyforge.org/tracker/index.php?func=detail&aid=8406&group_id=5&atid=101

So, until that bug is resolved, I'm going to move this request over to Feature Requests and we'll use that for the time being for documentation-related requests.

Cheers,
David



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

Comment By: David Chelimsky (dchelimsky)
Date: 2007-02-08 09:49

Message:
Lame, lame, lame. For whatever reason, if you're logged when you view http://rubyforge.org/tracker/?group_id=797, you see a Documentation tracker. If you're not, you don't.

I'll go ahead and move it myself. Please email the list if you are unable to view this item now that it's moved.

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

Comment By: Jerry West (jjw)
Date: 2007-02-08 09:41

Message:
Apologies. 

Where can I find the documentation tracker, please?  My
RubyForge Tracker tab only lists Bugs; Support Requests;
Patches and Feature Requests.  None of these have a
documentation category so far as I can see.

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

Comment By: David Chelimsky (dchelimsky)
Date: 2007-02-08 09:29

Message:
Jerry - you submitted the request to Patches, but I think you intended for us to make a change rather than you submitting a patch. If this is correct, this belongs over in the Documentation tracker. If so, please try to move it there. If you have any trouble, add a comment here and I'll move it.

Cheers,
David

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

Comment By: David Chelimsky (dchelimsky)
Date: 2007-02-08 09:21

Message:
Where's the patch?

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

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


More information about the rspec-devel mailing list