diff options
-rw-r--r-- | lib/custodian/testfactory.rb | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/lib/custodian/testfactory.rb b/lib/custodian/testfactory.rb index db3f339..358e676 100644 --- a/lib/custodian/testfactory.rb +++ b/lib/custodian/testfactory.rb @@ -99,10 +99,21 @@ module Custodian # # We do this only after we've instantiated the test. # - if line =~ /\s+otherwise\s+'([^']+)'/ + if line =~ /\s+otherwise\s+'([^']+)'/ obj.set_notification_text($1.dup) end + + # + # Some tests will replace their subject. + # + # + if line =~ /\s+with\s+subject\s+'([^']+)'/ + obj.set_subject($1.dup) + else + obj.set_subject( nil ) + end + # # Is the test inverted? # @@ -168,6 +179,20 @@ module Custodian end + # + # If this test has a custom subject then return it + # + def get_subject + @subject + end + + + # + # Setup a custom subject for the (mauve) alert we raise + # + def set_subject( subject ) + @subject = subject + end # |