Forum: Ruby on Rails testing for values

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Kian (Guest)
on 2006-05-06 00:05
(Received via mailing list)
Is there any way in a functional test to get the value of the flash hash
if the value was set using It doesn't appear to be visible in
flash in the test. Example:


def index['notice'] = 'this is the index'

Functional Test:

def test_index_flash
  get :index
  assert_equal 'this is the index', flash['notice']

This will fail with the message:
<"this is the index"> expected but was

Any ideas? I've seen this come up in the mailing lists before,
but can't seem to find an answer or workaround. Or maybe just
an explanation -- why does this happen?

Isak H. (Guest)
on 2006-06-22 16:38
(Received via mailing list)
Did you learn anything on this? Would like to know myself.

This topic is locked and can not be replied to.