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.



1186
1187
1188
# File 'lib/test/unit/assertions.rb', line 1186

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



1198
1199
1200
# File 'lib/test/unit/assertions.rb', line 1198

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

Instance Method Details

#inspectObject



1190
1191
1192
1193
1194
1195
1196
# File 'lib/test/unit/assertions.rb', line 1190

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