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