It depends on what you are trying to verify.
If you check if the flash text is βHelloβ, you are sure that you know what your user will see.
On the other hand, checking whether the flash memory contains the same as the auxiliary "t" for a given line also makes sense sometimes - for example, when your translation file is changed frequently or its contents are created by someone else, after some time.
I personally verify the exact final translation ( assert_equal "Hello", flash[:message] ).
This assures me that: 1) the translation sounds normal, 2) the language is correctly recognized (you do not want the Polish messages to be for your English users?)
Regarding the second part of your question:
Maybe " should_set_the_flash_to I18n.t("sign_up.welcome") will work?
source share