summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSteve Kemp <steve@steve.org.uk>2018-02-22 16:05:51 +0200
committerSteve Kemp <steve@steve.org.uk>2018-02-22 16:05:51 +0200
commit1f3d5467758529812601111b8b4fdf2566abd3d4 (patch)
treed0c759084b69d6f2220ca0265f34b9979a1c0b80 /lib
parentaa0e8f5e85ff46c06ca6d9d1b303926936ff288d (diff)
Updated the file-alerter to use the subject.21-allow-custom-subjects
If a subject is specified in a test that will now be used for the raise/clear message. This allows testing of the new parser-change(s).
Diffstat (limited to 'lib')
-rw-r--r--lib/custodian/alerts/file.rb12
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/custodian/alerts/file.rb b/lib/custodian/alerts/file.rb
index 06a704e..0c7a6dd 100644
--- a/lib/custodian/alerts/file.rb
+++ b/lib/custodian/alerts/file.rb
@@ -31,7 +31,12 @@ module Custodian
# Record a raise event for the given test.
#
def raise
- write_message("RAISE: #{test.target} failed #{test.get_type}-test - #{test.error}")
+ subject = test.target
+ subject = test.get_subject() unless test.get_subject().nil?
+
+ write_message("RAISE: #{subject} failed #{test.get_type}-test - #{test.error}")
+
+
end
@@ -47,7 +52,10 @@ module Custodian
# Record a clear event for the given test.
#
def clear
- write_message("CLEAR: #{test.target} failed #{test.get_type}-test")
+ subject = test.target
+ subject = test.get_subject() unless test.get_subject().nil?
+
+ write_message("CLEAR: #{subject} failed #{test.get_type}-test")
end