From c53d9a9fbbb39650803d9f6497630a016e802063 Mon Sep 17 00:00:00 2001 From: Alexander Momchilov Date: Thu, 5 Dec 2024 12:20:50 -0500 Subject: [PATCH] Un-hardcode repo name in test suite --- test/rbs/cli_test.rb | 10 +++++----- test/rbs/collection/installer_test.rb | 2 +- test/rbs/test/runtime_test_test.rb | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/test/rbs/cli_test.rb b/test/rbs/cli_test.rb index dc7f08bb9..1ed32d07e 100644 --- a/test/rbs/cli_test.rb +++ b/test/rbs/cli_test.rb @@ -252,9 +252,9 @@ def test_method assert_includes stdout.string, 'accessibility: public' assert_includes stdout.string, 'types:' assert_includes stdout.string, ' () -> ::Enumerator[self, untyped]' - assert_includes stdout.string, 'rbs/core/kernel.rbs' + assert_includes stdout.string, 'core/kernel.rbs' assert_includes stdout.string, '| [T] () { (self) -> T } -> T' - assert_includes stdout.string, 'rbs/core/kernel.rbs' + assert_includes stdout.string, 'core/kernel.rbs' end Dir.mktmpdir do |dir| @@ -855,8 +855,8 @@ def test_version def test_paths with_cli do |cli| cli.run(%w(-r pathname -I no-such-dir paths)) - assert_match %r{/rbs/core \(dir, core\)$}, stdout.string - assert_match %r{/rbs/stdlib/pathname/0 \(dir, library, name=pathname\)$}, stdout.string + assert_match %r{/core \(dir, core\)$}, stdout.string + assert_match %r{/stdlib/pathname/0 \(dir, library, name=pathname\)$}, stdout.string assert_match %r{^no-such-dir \(absent\)$}, stdout.string end end @@ -866,7 +866,7 @@ def test_paths_with_gem with_cli do |cli| cli.run(%w(-r rbs-amber paths)) - assert_match %r{/rbs/core \(dir, core\)$}, stdout.string + assert_match %r{/core \(dir, core\)$}, stdout.string assert_match %r{/sig \(dir, library, name=rbs-amber\)$}, stdout.string end end diff --git a/test/rbs/collection/installer_test.rb b/test/rbs/collection/installer_test.rb index 689df0838..ccd307891 100644 --- a/test/rbs/collection/installer_test.rb +++ b/test/rbs/collection/installer_test.rb @@ -105,7 +105,7 @@ def test_install_from_gem_sig_dir assert dest.directory? assert dest.glob('*').empty? # because rubygems installer does nothing - assert_match(%r!Using rbs-amber:1.0.0 \(.+/rbs/test/assets/test-gem/sig\)!, stdout.string) + assert_match(%r!Using rbs-amber:1.0.0 \(.+/test/assets/test-gem/sig\)!, stdout.string) assert_match("It's done! 1 gems' RBSs now installed.", stdout.string) end end diff --git a/test/rbs/test/runtime_test_test.rb b/test/rbs/test/runtime_test_test.rb index d1735af1a..89dc2e2ba 100644 --- a/test/rbs/test/runtime_test_test.rb +++ b/test/rbs/test/runtime_test_test.rb @@ -94,7 +94,7 @@ def refute_test_success(other_env: {}, rbs_content: nil, ruby_content: nil) def test_test_target output = refute_test_success(other_env: { "RBS_TEST_TARGET" => nil }) - assert_match "rbs/test/setup handles the following environment variables:", output + assert_match "test/setup handles the following environment variables:", output end def test_no_test_install