Yi wrote:
Hi,

How can I test flash.now[:key] is being set in a controller test? Both flash[:key] and flash.now[:key].should == message didn't work

I can use response.session["flash"][:key].should == message . Just looks bad

Thanks

Yi

--
http://yiwenandsoftware.wordpress.com


In the past I have used this article to test flash.now in rspec:
http://www.kerrybuckley.org/2007/07/04/correct-use-of-the-flash-in-rails/

Note, that the post is pretty old and so rspec-rails may support this out of the box by now.. I don't know though.

-Ben
_______________________________________________
rspec-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to