Forum: Ruby on Rails assert_template fails?

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Vamsee K. (Guest)
on 2005-12-18 12:06
(Received via mailing list)
Hi All,

I have a seemingly simple problem - but can't figure out the problem. I
have a simple functional test like so:

  def test_should_show_search_dropdown
    get :index
    assert_response :success
    assert_template :search

Inspite of having search.rhtml in /app/views/layout, it fails with an

  1) Error:
NoMethodError: undefined method `include?' for :search:Symbol




1 tests, 1 assertions, 0 failures, 1 errors

Anybody can tell me where I'm going wrong?

Lou V. (Guest)
on 2005-12-18 16:00
(Received via mailing list)
instead of using a symbol, use a string:

   assert_template 'search'
This topic is locked and can not be replied to.