Frederick Cheung wrote in post #1074851:
> On Tuesday, September 4, 2012 12:56:05 AM UTC+1, Ruby-Forum.com User
> wrote:
> Controller specs bypass your routes entirely (as part as action invocation
> goes, they're still used if you try to generate a url inside the
> action).
> If you do
>
> get :action_name
>
> then it will invoke that action with a get request, whether there's a
> route
> for it or not.
>
> post '/login'
> fails because there are is no '/login' action (but there is a 'login'
> one).
>
> If you write an spec request spec (or a rails integration test) then
> get/post are the rack test methods instead which do take actual paths.
>
> Fred

If I'm getting what you say, in a controller spec it's not really
important if I use get, post, delete or put methods - unless the action
itself has some logic affected by the request type, right? :)

-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to