Skip to content

Commit

Permalink
Fix test_loaded_gem_types faling in test-bundled-gems (take 2)
Browse files Browse the repository at this point in the history
`#{gem_dir}/sig` dir does not exist when running `make test-bundled-gems`.
We need to omit the test.
  • Loading branch information
tompng committed Dec 16, 2024
1 parent b16b0e5 commit 9a82e7d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions test/repl_type_completor/test_repl_type_completor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -254,9 +254,13 @@ def test_doc_namespace_error
end

def test_loaded_gem_types
result = ReplTypeCompletor.analyze 'RBS::CLI::LibraryOptions.new.loader.', binding: binding
# sig directory does not exist when running with test-bundled-gems
omit unless Dir.exist?("#{Gem.loaded_specs['prism'].gem_dir}/sig")

result = ReplTypeCompletor.analyze 'Prism.parse("code").', binding: binding
candidtes = result.completion_candidates
assert_includes candidtes, 'add'
assert_includes candidtes, 'success?'
assert_includes candidtes, 'failure?'
end

def test_info
Expand Down

0 comments on commit 9a82e7d

Please sign in to comment.