Skip to content

Commit 2893c53

Browse files
committed
Fix test_loaded_gem_types faling in test-bundled-gems (take 3)
Gem.loaded_specs does not include prism when running with `make test-bundled-gems`. `require 'prism'; Gem.loaded_specs['prism']` returns nil. This does not happend when running the test with `tool/test-bundled-gems.rb`. This does not happen with RBS. Revert again to use sig defined in RBS instead of Prism.
1 parent 9824936 commit 2893c53

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

test/repl_type_completor/test_repl_type_completor.rb

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -254,13 +254,12 @@ def test_doc_namespace_error
254254
end
255255

256256
def test_loaded_gem_types
257-
# sig directory does not exist when running with test-bundled-gems
258-
omit unless Dir.exist?("#{Gem.loaded_specs['prism'].gem_dir}/sig")
257+
# gem_dir/sig directory does not exist when running with `make test-bundled-gems`
258+
omit unless Dir.exist?("#{Gem.loaded_specs['rbs'].gem_dir}/sig")
259259

260-
result = ReplTypeCompletor.analyze 'Prism.parse("code").', binding: binding
260+
result = ReplTypeCompletor.analyze 'RBS::CLI::LibraryOptions.new.loader.', binding: binding
261261
candidtes = result.completion_candidates
262-
assert_includes candidtes, 'success?'
263-
assert_includes candidtes, 'failure?'
262+
assert_includes candidtes, 'add'
264263
end
265264

266265
def test_info

0 commit comments

Comments
 (0)