Ask for Help
“Do you have to use to_param in functional tests?”
In the past you could simply provide an object in a param list in functional tests and the to_param for the object would be called to get the proper value for the parameter. This is now broken, forcing you to use object.to_param every time.
Perhaps not helpful for existing projects but I recommend you use cucumber, webrat, or even selenium rather than Rails functional tests. Rails functional tests require that you specify parameters and specify them correctly. If you get them wrong your functional tests might continue to pass for the wrong reason. Here’s another “bad params in functional tests” post.
Interesting Things
- Rubyconf program should be available today on their website
We only do Integration tests, even if its only about one controller; not aware of this problem.
Stephan
September 11, 2009 at 1:47 pm
These posts are awesome, FWIW.
Now I’m thinking of doing a similar thing from our standup meetings over at our [underused] engineering blog.
November 10, 2009 at 5:46 pm