class Metasploit::Model::Spec::I18nExceptionHandler
Raises all I18n errors as exceptions so that missing translations (or other errors) with en.yml are caught by the specs.
@example Use in spec_helper.rb to find missing translations
RSpec.configure do |config| config.before(:suite) do # catch missing translations I18n.exception_handler = Metasploit::Model::Spec::I18nExceptionHandler.new end end
Public Instance Methods
call(exception, locale, key, options)
click to toggle source
Raises `exception`.
@return [void] @raise [Exception]
# File lib/metasploit/model/spec/i18n_exception_handler.rb, line 16 def call(exception, locale, key, options) raise exception.to_exception end