# File lib/test/rails/controller_test_case.rb, line 273 def assert_flash(key, content) assert flash.include?(key), "#{key.inspect} missing from flash, has #{flash.keys.inspect}" case content when Regexp then assert_match content, flash[key], "Content of flash[#{key.inspect}] did not match" else assert_equal content, flash[key], "Incorrect content in flash[#{key.inspect}]" end end