Hi,
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)
end
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
Mike