Class: Test::Unit::Notification
Relationships & Source Files | |
Super Chains via Extension / Inclusion / Inheritance | |
Instance Chain:
self,
Util::BacktraceFilter
|
|
Inherits: | Object |
Defined in: | lib/test/unit/notification.rb |
Constant Summary
-
LABEL =
# File 'lib/test/unit/notification.rb', line 11"Notification"
-
SINGLE_CHARACTER =
# File 'lib/test/unit/notification.rb', line 10'N'
Util::BacktraceFilter - Included
Class Method Summary
-
.new(test_name, location, message, options = {}) ⇒ Notification
constructor
Creates a new
Notification
with the given location and message.
Instance Attribute Summary
- #critical? ⇒ Boolean readonly
- #location readonly
- #message readonly
- #method_name readonly
- #test_name readonly
Instance Method Summary
- #label
-
#long_display
Returns a verbose version of the error description.
-
#short_display
Returns a brief version of the error description.
-
#single_character_display
Returns a single character representation of a notification.
-
#to_s
Overridden to return long_display.
Util::BacktraceFilter - Included
Constructor Details
.new(test_name, location, message, options = {}) ⇒ Notification
Creates a new Notification
with the given location and message.
# File 'lib/test/unit/notification.rb', line 15
def initialize(test_name, location, , ={}) @test_name = test_name @location = location @message = @method_name = [:method_name] end
Instance Attribute Details
#critical? ⇒ Boolean
(readonly)
[ GitHub ]
# File 'lib/test/unit/notification.rb', line 47
def critical? false end
#location (readonly)
[ GitHub ]# File 'lib/test/unit/notification.rb', line 7
attr_reader :test_name, :location, :
#message (readonly)
[ GitHub ]#method_name (readonly)
[ GitHub ]# File 'lib/test/unit/notification.rb', line 8
attr_reader :method_name
#test_name (readonly)
[ GitHub ]# File 'lib/test/unit/notification.rb', line 7
attr_reader :test_name, :location, :
Instance Method Details
#label
[ GitHub ]# File 'lib/test/unit/notification.rb', line 27
def label LABEL end
#long_display
Returns a verbose version of the error description.
#short_display
Returns a brief version of the error description.
# File 'lib/test/unit/notification.rb', line 32
def short_display "#{@test_name}: #{@message.split("\n")[0]}" end
#single_character_display
Returns a single character representation of a notification.
# File 'lib/test/unit/notification.rb', line 23
def single_character_display SINGLE_CHARACTER end
#to_s
Overridden to return long_display.
# File 'lib/test/unit/notification.rb', line 43
def to_s long_display end