Class: Test::Unit::Assertions::AssertExceptionHelper::WrappedException

Inherits:
Object
  • Object
show all
Defined in:
lib/test/unit/assertions.rb

Instance Method Summary collapse

Constructor Details

#initialize(exception) ⇒ WrappedException

Returns a new instance of WrappedException.



1766
1767
1768
# File 'lib/test/unit/assertions.rb', line 1766

def initialize(exception)
  @exception = exception
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(name, *args, &block) ⇒ Object



1778
1779
1780
# File 'lib/test/unit/assertions.rb', line 1778

def method_missing(name, *args, &block)
  @exception.__send__(name, *args, &block)
end

Instance Method Details

#inspectObject



1770
1771
1772
1773
1774
1775
1776
# File 'lib/test/unit/assertions.rb', line 1770

def inspect
  if default_inspect?
    "#{@exception.class.inspect}(#{@exception.message.inspect})"
  else
    @exception.inspect
  end
end