Forum: Ruby on Rails how to test flash.now?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
16319aba44da117ca73484d1ce32227b?d=identicon&s=25 Szczepan Faber (szczepiq)
on 2006-03-11 22:07
(Received via mailing list)
Hi gurus

How to test that controller actions sets flash.now[:info]

I cannot test it from standard functional TestCase since it is
eradicated after action execution.

Standard flash hash can be tested freely within TestCase... Eg.
flash[:info]

Thanks in advance
Szczepiq
009c581be96c1c9a2da7da4741c9580b?d=identicon&s=25 Anonymous (Guest)
on 2006-04-14 02:18
(Received via mailing list)
flash.now is incredibly useful as a standard mechanism for conveying
controller errors (as opposed to model errors) to forms, and I'd really
love to be able to write functional tests concerning its contents.
Please let me know if there's some way to access the flash.now hash in a
functional test after a request has completed.
This topic is locked and can not be replied to.