Saturday, January 16, 2010

[Rails] Re: Test params

Learn by Doing wrote:
> Hi,
>
> In my RESTful implementation, :new shows a form for @link . When a
> user clicks on Create, the value of @link is posted to :create through
> params. How do I test the value of params and that :create actually
> uses these value to create a new link.
>
> Right now I test :create by by using a link fixture but I want to
> actually use the value of params passed in through :new. I suspect
> that an integration test is needed but how can I do this?

Use Cucumber. It makes this kind of thing pretty easy.

>
> Thanks.
>
> Vincent.

Best,
-- 
Marnen Laibow-Koser
http://www.marnen.org
marnen@marnen.org
--
Posted via http://www.ruby-forum.com/.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate