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.



1222
1223
1224
# File 'lib/test/unit/assertions.rb', line 1222

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



1234
1235
1236
# File 'lib/test/unit/assertions.rb', line 1234

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

Instance Method Details

#inspectObject



1226
1227
1228
1229
1230
1231
1232
# File 'lib/test/unit/assertions.rb', line 1226

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