Sometimes the simple way is best | May 4th, 2008
Testing flash.now with RSpec - Xavier Shay’s Blog
This turned out to be the simplest way I could find to easily test flash.now - my only addition was a simple helper method
def keep_flash_now
@controller.instance_eval { flash.extend(DisableFlashSweeping) }
end
It makes it easier to understand what is going on in thest.
Leave a Reply
Moderation Active: Old stuff here... Therefore your comment on this post will be moderated (i.e. don't submit twice !)