10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
# File 'lib/angry-pickle.rb', line 10
def self.included(base)
base.class_eval do
alias print_stats_original print_stats
def print_stats(features, profiles = [])
print_stats_original(features, profiles)
failed = step_mother.scenarios(:failed).count
passed = step_mother.scenarios(:passed).count
pending = step_mother.scenarios(:pending).count
message = %{#{passed} passed\n#{failed} failed\n#{pending} pending}
img = failed > 0 ? FAILED_IMG : pending > 0 ? PENDING_IMG : PASSED_IMG
system "growlnotify -t 'Cucumber Scenarios' --image '#{DIR}#{img}' -m '#{message}'"
end
end
end
|