I want to make sure I have the right meta desc/keyword and title text in my view so I want to create rspec views tests for that. Now the real challange here is how to make it work across multiple languages.
The way I ve done it is:
it "should have the right page title" do
title = "some nice title here"
response.should have_tag("title", title)
end
So because the "requirement" is hard coded in that example, I am having a hard time figuring out how to do the same thing for all the other languages in my config/locale/.
I m not sure if this is the best way to do it or should I just fetch the text from the locale/lang.yml like so :
it "should have the right page title" do
title = t( site.title )
response.should have_tag("title", title)
end
Thanks