class ChefSpec::Matchers::NotificationsMatcher

def format_notification(notification)

def format_notification(notification)
  notifying_resource = notification.notifying_resource
  resource = notification.resource
  if notifying_resource.immediate_notifications.include?(notification)
    type = :immediately
  elsif notifying_resource.before_notifications.include?(notification)
    type = :before
  else
    type = :delayed
  end
  %Q{  "#{notifying_resource}" notifies "#{resource_name(resource)}[#{resource.name}]" to :#{notification.action}, :#{type}}
end