Skip to content

Commit

Permalink
Prevent state leak
Browse files Browse the repository at this point in the history
  • Loading branch information
andyw8 committed Oct 4, 2023
1 parent 03b19db commit 90904da
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion test/requests/support/dependency_detector_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@

module RubyLsp
class DependencyDetectorTest < Minitest::Test
def setup
Singleton.__init__(RubyLsp::DependencyDetector)
end

def test_detects_no_test_library_when_there_are_no_dependencies
stub_dependencies({})

Expand Down Expand Up @@ -48,7 +52,6 @@ def test_direct_dependency_returns_false_outside_of_bundle
private

def stub_dependencies(dependencies)
Singleton.__init__(RubyLsp::DependencyDetector)
Bundler.locked_gems.stubs(dependencies: dependencies)
end
end
Expand Down

0 comments on commit 90904da

Please sign in to comment.