2017-07-23 11:17:16 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2016-08-06 13:03:39 -04:00
|
|
|
require "active_support/core_ext/kernel/reporting"
|
2010-08-22 17:43:31 -04:00
|
|
|
|
2011-12-24 07:57:54 -05:00
|
|
|
# These are the normal settings that will be set up by Railties
|
|
|
|
# TODO: Have these tests support other combinations of these values
|
|
|
|
silence_warnings do
|
2017-01-11 03:48:00 -05:00
|
|
|
Encoding.default_internal = Encoding::UTF_8
|
|
|
|
Encoding.default_external = Encoding::UTF_8
|
2010-08-21 21:53:04 -04:00
|
|
|
end
|
2010-03-17 02:24:00 -04:00
|
|
|
|
2015-11-04 16:32:53 -05:00
|
|
|
module Rails
|
|
|
|
def self.root
|
2017-05-15 10:17:28 -04:00
|
|
|
File.expand_path("..", __dir__)
|
2015-11-04 16:32:53 -05:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2016-08-06 13:03:39 -04:00
|
|
|
require "active_support/testing/autorun"
|
2019-08-02 00:24:21 -04:00
|
|
|
require "active_support/testing/method_call_assertions"
|
2016-08-06 13:03:39 -04:00
|
|
|
require "action_mailer"
|
|
|
|
require "action_mailer/test_case"
|
2011-04-26 06:04:48 -04:00
|
|
|
|
2013-07-17 09:13:16 -04:00
|
|
|
# Emulate AV railtie
|
2016-08-06 13:03:39 -04:00
|
|
|
require "action_view"
|
2015-01-31 23:12:37 -05:00
|
|
|
ActionMailer::Base.include(ActionView::Layouts)
|
2013-07-17 09:13:16 -04:00
|
|
|
|
2006-09-03 23:38:13 -04:00
|
|
|
# Show backtraces for deprecated behavior for quicker cleanup.
|
|
|
|
ActiveSupport::Deprecation.debug = true
|
|
|
|
|
2013-12-16 13:04:07 -05:00
|
|
|
# Disable available locale checks to avoid warnings running the test suite.
|
|
|
|
I18n.enforce_available_locales = false
|
|
|
|
|
2017-05-15 10:17:28 -04:00
|
|
|
FIXTURE_LOAD_PATH = File.expand_path("fixtures", __dir__)
|
2010-01-24 13:36:42 -05:00
|
|
|
ActionMailer::Base.view_paths = FIXTURE_LOAD_PATH
|
2012-09-10 15:52:19 -04:00
|
|
|
|
2018-12-12 15:49:35 -05:00
|
|
|
ActionMailer::Base.delivery_job = ActionMailer::MailDeliveryJob
|
|
|
|
|
2019-08-02 00:24:11 -04:00
|
|
|
class ActiveSupport::TestCase
|
2019-08-02 00:24:21 -04:00
|
|
|
include ActiveSupport::Testing::MethodCallAssertions
|
|
|
|
|
2019-08-02 00:24:11 -04:00
|
|
|
private
|
|
|
|
# Skips the current run on Rubinius using Minitest::Assertions#skip
|
|
|
|
def rubinius_skip(message = "")
|
|
|
|
skip message if RUBY_ENGINE == "rbx"
|
|
|
|
end
|
|
|
|
|
|
|
|
# Skips the current run on JRuby using Minitest::Assertions#skip
|
|
|
|
def jruby_skip(message = "")
|
|
|
|
skip message if defined?(JRUBY_VERSION)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2019-03-24 13:59:28 -04:00
|
|
|
require_relative "../../tools/test_common"
|