| Class | Test::Unit::Error |
| In: |
test/unit/error.rb
|
| Parent: | Object |
Encapsulates an error in a test. Created by Test::Unit::TestCase when it rescues an exception thrown during the processing of a test.
| SINGLE_CHARACTER | = | 'E' |
| exception | [R] | |
| test_name | [R] |
Returns a verbose version of the error description.
# File test/unit/error.rb, line 45 def long_display backtrace = filter_backtrace(@exception.backtrace).join("\n ") "Error:\n#@test_name:\n#{message}\n #{backtrace}" end
Returns a brief version of the error description.
# File test/unit/error.rb, line 40 def short_display "#@test_name: #{message.split("\n")[0]}" end
Returns a single character representation of an error.
# File test/unit/error.rb, line 30 def single_character_display SINGLE_CHARACTER end
Overridden to return long_display.
# File test/unit/error.rb, line 51 def to_s long_display end
ruby-doc.org is hosted and maintained by James Britt and Neurogami, LLC, a Ruby consulting company. The site was created in 2002 as part of the Ruby Documentation Project to promote the Ruby language and to help other Ruby hackers.
Documentation content on ruby-doc.org is provided by remarkable members of the Ruby community.
For more information on the Ruby programming language, visit ruby-lang.org.
For information about this site or Neurogami, contact james@neurogami.com.