module Shoulda::ActionController::Macros

def should_set_the_flash_to(val)

should_set_the_flash_to /created/i
should_set_the_flash_to "Thank you for placing this order."

Example:

This behavior is deprecated.
If the argument is +nil+, it will assert that the flash is not set.

value. Expects a +String+ or +Regexp+.
Macro that creates a test asserting that the flash contains the given
def should_set_the_flash_to(val)
  if val
    matcher = set_the_flash.to(val)
    should matcher.description do
      assert_accepts matcher, @controller
    end
  else
    warn "[DEPRECATION] should_set_the_flash_to nil is deprecated. " <<
         "Use should_not_set_the_flash instead."
    should_not_set_the_flash
  end
end