summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/error_highlight/test_error_highlight.rb2
-rw-r--r--test/rdoc/test_rdoc_ri_driver.rb8
-rw-r--r--test/rubygems/test_gem_dependency.rb2
-rw-r--r--test/rubygems/test_require.rb4
4 files changed, 8 insertions, 8 deletions
diff --git a/test/error_highlight/test_error_highlight.rb b/test/error_highlight/test_error_highlight.rb
index 63e7032eda..f0da5b5e62 100644
--- a/test/error_highlight/test_error_highlight.rb
+++ b/test/error_highlight/test_error_highlight.rb
@@ -1241,7 +1241,7 @@ nil can't be coerced into Integer (TypeError)
assert_error_message(NoMethodError, <<~END) do
undefined method `time' for #{ ONE_RECV_MESSAGE }
-{:first_lineno=>#{ __LINE__ + 3 }, :first_column=>7, :last_lineno=>#{ __LINE__ + 3 }, :last_column=>12, :snippet=>" 1.time {}\\n"}
+#{{ first_lineno: __LINE__ + 3, first_column: 7, last_lineno: __LINE__ + 3, last_column: 12, snippet: " 1.time {}\n" }.inspect}
END
1.time {}
diff --git a/test/rdoc/test_rdoc_ri_driver.rb b/test/rdoc/test_rdoc_ri_driver.rb
index 39e6e67759..3263e6173e 100644
--- a/test/rdoc/test_rdoc_ri_driver.rb
+++ b/test/rdoc/test_rdoc_ri_driver.rb
@@ -54,10 +54,10 @@ class TestRDocRIDriver < RDoc::TestCase
RDoc::RI::Driver.dump @store1.cache_path
end
- assert_match %r%:class_methods%, out
- assert_match %r%:modules%, out
- assert_match %r%:instance_methods%, out
- assert_match %r%:ancestors%, out
+ assert_match %r%:class_methods|class_methods:%, out
+ assert_match %r%:modules|modules:%, out
+ assert_match %r%:instance_methods|instance_methods:%, out
+ assert_match %r%:ancestors|ancestors:%, out
end
def test_add_also_in_empty
diff --git a/test/rubygems/test_gem_dependency.rb b/test/rubygems/test_gem_dependency.rb
index 2a989a5551..a0bfee0239 100644
--- a/test/rubygems/test_gem_dependency.rb
+++ b/test/rubygems/test_gem_dependency.rb
@@ -22,7 +22,7 @@ class TestGemDependency < Gem::TestCase
Gem::Dependency.new "monkey" => "1.0"
end
- assert_equal 'dependency name must be a String, was {"monkey"=>"1.0"}',
+ assert_equal "dependency name must be a String, was #{{ "monkey" => "1.0" }.inspect}",
e.message
end
diff --git a/test/rubygems/test_require.rb b/test/rubygems/test_require.rb
index 48d66736fd..f15e9b6243 100644
--- a/test/rubygems/test_require.rb
+++ b/test/rubygems/test_require.rb
@@ -721,11 +721,11 @@ class TestGemRequire < Gem::TestCase
_, err = capture_subprocess_io do
system(*ruby_with_rubygems_in_load_path, "-w", "--disable=gems", "-C", dir, "main.rb")
end
- assert_match(/{:x=>1}\n{:y=>2}\n$/, err)
+ assert_match(/#{{ x: 1 }.inspect}\n#{{ y: 2 }.inspect}\n$/, err)
_, err = capture_subprocess_io do
system(*ruby_with_rubygems_in_load_path, "-w", "--enable=gems", "-C", dir, "main.rb")
end
- assert_match(/{:x=>1}\n{:y=>2}\n$/, err)
+ assert_match(/#{{ x: 1 }.inspect}\n#{{ y: 2 }.inspect}\n$/, err)
end
end
end