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.



1675
1676
1677
# File 'lib/test/unit/assertions.rb', line 1675

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



1687
1688
1689
# File 'lib/test/unit/assertions.rb', line 1687

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

Instance Method Details

#inspectObject



1679
1680
1681
1682
1683
1684
1685
# File 'lib/test/unit/assertions.rb', line 1679

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