[rspec-users] Which "get" is being used in Controller spec

Mike Schiller mike.sch.list at gmail.com
Thu Jun 12 02:40:43 EDT 2008

I'm a bit puzzled with "get" in controller specs. When I write,

it "should render index template" do
  get :index
  response.should render_template(:index)

Which "get" method is being used? I checked RDoc of RSpec and RSpec on
Rails, but didn't find "get".
In Rails RDoc, I found the following "get"s.

get ActionController::Integration::Session
get ActiveResource::Connection
get ActiveResource::CustomMethods
get ActiveResource::CustomMethods::InstanceMethods

I'm not sure which one is working. But after playing a while, I noticed
"get" doesn't take "path" as a parameter. For example,

get "users"

doesn't work. I also need to know about "post" because some code I saw seems
to be passing
parameters like:

post :create :id => 1

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20080612/03510ff0/attachment.html>

More information about the rspec-users mailing list