If you are using functional tests, then just use assert_select to verify that the HTML that the partial generates is somewhere in the response. For example, if you have a partial that prints out "<div>hello</div>", test a controller that has a view that calls that partial, and then do
assert_select "div", "hello" then you'll know the partial worked. On Tue, Apr 13, 2010 at 4:06 AM, Hemant Bhargava <li...@ruby-forum.com>wrote: > Guys, > > How can we test partials and layouts.. ? Googled but find nothing > useful.. > -- > Posted via http://www.ruby-forum.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 rubyonrails-t...@googlegroups.com. > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscr...@googlegroups.com<rubyonrails-talk%2bunsubscr...@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > > -- 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 rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.