Forum: Ruby on Rails flash.now in functional tests

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.
Jeroen H. (Guest)
on 2006-04-14 15:54
(Received via mailing list)
Hi,

Does anybody know how I can access messages set using flash.now in my
functional tests? assert_equal 'my notice', flash[:notice] doesn't. I
guess that makes sense since they're flushed as soon as the request
request is finished. You can scan the HTML for a particular string you
expect to be displayed, but is there a more direct way of doing this?

Cheers,

Jeroen
This topic is locked and can not be replied to.