Testing flash.now with rspec

I've spent a couple of hour trying to test a Rails controller. More specifically one of the action is suppose to display flash.now notice and I want to test that and it works. It took me awhile and some googling to realise that the content of a flash.now is deleted after the action, so that you cannot test it the same way as a normal flash (that last for the duration of the current action and the next one).

I came an across an elegant solution  to this problem as decribed on this blog.