I agree with Piotr.You should never be testing that routes are there in 
your application, but rather that whatever's on the end of that route is 
performing as it should.Let's say that I have a /forums route that displays a 
list of forums, one of them being called "The Ghetto". In my test, I would 
assert that when I go to ForumsController#index that I see "The Ghetto" within 
"#forums h2".By doing this I'm testing at least three things:1) The route 
exists and that I can route to the controller2) The controller assigns 
information to a variable that the view can use3) The view renders that 
information correctly*(Correctly is subjective, design is an inexact science)
        
        -- Ryan Bigg
                
                
        On Wednesday, 17 November 2010 at 4:17 AM, Piotr Sarnacki wrote:
        
            On Oct 18, 7:13 pm, Joe Fiorini <[email protected]> wrote: 
ActionDispatch::Assertions::RoutingAssertions (https://gist.github.com/ 
a57e3addfe0aa3857e12). Does anyone else see value for this in core? Is the code 
okay?I personally would not use that. You're just adding line to tests 
thatensures that you added line to routes.Instead of doing that I would rather 
add some higher level test thatchecks if you can reach engine at 
blog.root_path. But that's just myopinion and I'm not in core, so maybe you 
will get more luck with theothers ;-)-- You received this message because you 
are subscribed to the Google Groups "Ruby on Rails: Core" group.To post to this 
group, send email to [email protected] unsubscribe from this 
group, send email to [email protected] more 
options, visit this group at 
http://groups.google.com/group/rubyonrails-core?hl=en.
                        
                        
                        
                        
        
                
                
    

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" 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-core?hl=en.

Reply via email to