I have a HomeController that renders one of two templates for its
index action based on whether or not the user is authenticated.

The template names are "index" and "authenticated_index".

If I assert_template "index" when testing both use cases
assert_template returns true.  I would not expect this as the
templates are not the same and for authenticated users you are not
getting the index controller but rather the atuhenticated_index
controller.

>From a review of the docs for assert_template am I correct in seeing
that the code uses a string.match()?  If this is true I could get many
false positives if I only require the template rendered to "match" the
string in my test as opposed to specifically ensure that the template
I want is rendered.

Am I wrong in my expectations/assumptions?

--Michael

-- 
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