Namespace
Methods
A
T
W
Constants
Routes = ActionDispatch::Routing::RouteSet.new
 
APP = RoutedRackApp.new(Routes)
 
Instance Public methods
app()
# File actionmailer/test/i18n_with_controller_test.rb, line 48
def app
  APP
end
test_send_mail()
# File actionmailer/test/i18n_with_controller_test.rb, line 56
def test_send_mail
  stub_any_instance(Mail::SMTP, instance: Mail::SMTP.new({})) do |instance|
    assert_called(instance, :deliver!) do
      with_translation 'de', email_subject: '[Anmeldung] Willkommen' do
        ActiveSupport::Deprecation.silence do
          get '/test/send_mail'
        end
        assert_equal "Mail sent - Subject: [Anmeldung] Willkommen", @response.body
      end
    end
  end
end
Instance Protected methods
with_translation(locale, data)
# File actionmailer/test/i18n_with_controller_test.rb, line 71
def with_translation(locale, data)
  I18n.backend.store_translations(locale, data)
  yield
ensure
  I18n.backend.reload!
end