Skip to content

Commit b440700

Browse files
committed
Revert "Revert GlobalState caching in ExpectationsTestRunner"
This reverts commit 5e00b3b.
1 parent 5e00b3b commit b440700

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

test/requests/support/expectations_test_runner.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,14 @@ class ExpectationsTestRunner < Minitest::Test
88
TEST_PRISM_FIXTURES = File.join(TEST_FIXTURES_DIR, "prism/test/prism/fixtures/**", "*.txt")
99

1010
def setup
11-
@global_state = RubyLsp::GlobalState.new
11+
@global_state = self.class.shared_global_state
1212
end
1313

1414
class << self
15+
def shared_global_state
16+
@shared_global_state ||= RubyLsp::GlobalState.new
17+
end
18+
1519
def expectations_tests(handler_class, expectation_suffix)
1620
class_eval(<<~RB, __FILE__, __LINE__ + 1)
1721
module ExpectationsRunnerMethods

0 commit comments

Comments
 (0)