Pat Maddox wrote:
> Does
> put users_url(user), :user => {:administrator => true}
> not work?
>
I have spent a good deal of time trying to get this to work with no
success. I have read the api regarding the put method in:
ActionController::Integration::Session
which is what I believe provides the put method in the example, but I
cannot seem to get the signature to work out.
put(path, parameters = nil, headers = nil)
If the path argument is "users_url(user)" then what is user? The Rails
documentation describes the *_url methods thus:
> Behind the scenes the *_url method wraps a call to url_for on the route hash.
>
> The *_url method takes a single optional argument which is a hash that
> is merged on top of the url_for’ed route. This makes it so that a given
> named route can be parametrized when used with redirect_to, link_to, etc.
If I read this aright then in your example user should be a hash, but a
hash of what? Where would I create it in my test and what should it
contain?
--
Posted via http://www.ruby-forum.com/.
_______________________________________________
rspec-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/rspec-users