Skip to content

Commit

Permalink
Make sure either a valid symbol or nil is passed as image (Fixes #17).
Browse files Browse the repository at this point in the history
  • Loading branch information
netzpirat committed Sep 4, 2011
1 parent ab65d61 commit 4aca759
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/guard/cucumber/notification_formatter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,12 @@ def step_name(keyword, step_match, status, source_indent, background)
private

def notify_summary
icon, messages = '', []
icon, messages = nil, []

[:failed, :skipped, :undefined, :pending, :passed].reverse.each do |status|
if step_mother.steps(status).any?
icon = icon_for(status)
step_icon = icon_for(status)
icon = step_icon if step_icon
messages << dump_count(step_mother.steps(status).length, 'step', status.to_s)
end
end
Expand All @@ -70,6 +71,8 @@ def icon_for(status)
:pending
when :failed
:failed
else
nil
end
end

Expand Down

0 comments on commit 4aca759

Please sign in to comment.