[rspec-users] Using has_selector to identify responses.

James Byrne lists at ruby-forum.com
Tue Jan 13 16:11:32 EST 2009


This is more of a "best practices" question.

Earlier, when I was trying to understand what it was I was supposed to
be testing with cucumber, I was advised that I should test for text
elements contained in the response body of the expected output.  Now,
what I am wondering is how one accounts for multilingual implementation.

I have hit upon the idea of simply adding special css id selectors to
the templates that identify their use.  So, for example, instead of
looking for the word "Registration" I would look for a css selector
id=user_registration.

I know that this will work but, is there another, preferred, way of
handling this situation?

Regards,
-- 
Posted via http://www.ruby-forum.com/.


More information about the rspec-users mailing list