aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/rails_info_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'railties/test/rails_info_test.rb')
-rw-r--r--railties/test/rails_info_test.rb17
1 files changed, 3 insertions, 14 deletions
diff --git a/railties/test/rails_info_test.rb b/railties/test/rails_info_test.rb
index 9f4c5bb025..43b60b9144 100644
--- a/railties/test/rails_info_test.rb
+++ b/railties/test/rails_info_test.rb
@@ -1,19 +1,8 @@
-require "abstract_unit"
-
-unless defined?(Rails) && defined?(Rails::Info)
- module Rails
- class Info; end
- end
-end
+# frozen_string_literal: true
-require "active_support/core_ext/kernel/reporting"
+require "abstract_unit"
class InfoTest < ActiveSupport::TestCase
- def setup
- Rails.send :remove_const, :Info
- silence_warnings { load "rails/info.rb" }
- end
-
def test_property_with_block_swallows_exceptions_and_ignores_property
assert_nothing_raised do
Rails::Info.module_eval do
@@ -39,7 +28,7 @@ class InfoTest < ActiveSupport::TestCase
def test_rails_version
assert_property "Rails version",
- File.read(File.realpath("../../../RAILS_VERSION", __FILE__)).chomp
+ File.read(File.realpath("../../RAILS_VERSION", __dir__)).chomp
end
def test_html_includes_middleware