Hi Zoran,

On Fri, 2010-09-17 at 09:28 +0200, Zoran Szagaski wrote:
> Hey,
> 
> I'm trying to add some more tests to my application and was wondering
> what's the best way to test all my routes/views of my application. I'm
> using HAML which can lead to some typos since I'm new to it and of
> course the Ruby code itself in the views.
> 
> How would you test the views? Does it make sense to somehow extract all
> routes and "surf" on every possible route to check if it's a 200 or not?

I would recommend building up a set of integration tests using Cucumber
or similar: http://cukes.info/. This will allow you to check that all
the "moving parts" of your applications are working together correctly,
including that your routes/redirections/views are free from errors. You
can find a list of tutorials here:
http://wiki.github.com/aslakhellesoy/cucumber/tutorials-and-related-blog-posts

Cheers,
Jon

-- 
http://jonathanleighton.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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to