Class: RSpecGrowler
- Inherits:
-
Spec::Runner::Formatter::BaseFormatter
- Object
- Spec::Runner::Formatter::BaseFormatter
- RSpecGrowler
show all
- Includes:
- RSpactor::Growl
- Defined in:
- lib/rspec_growler.rb
Constant Summary
RSpactor::Growl::IMAGE_PATH
Instance Method Summary
collapse
#image_path, #notify
Instance Method Details
#dump_summary(duration, total, failures, pending) ⇒ Object
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
# File 'lib/rspec_growler.rb', line 7
def dump_summary(duration, total, failures, pending)
icon = if failures > 0
'failed'
elsif pending > 0
'pending'
else
'success'
end
image_path = File.dirname(__FILE__) + "/../images/#{icon}.png"
message = "#{total} examples, #{failures} failures"
if pending > 0
message << " (#{pending} pending)"
end
notify "Test Results", message, image_path(icon)
end
|