diff --git a/lib/ruby_lsp/ruby_lsp_rails/test_utils.rb b/lib/ruby_lsp/ruby_lsp_rails/test_utils.rb index 9432a0f3..b227bb3a 100644 --- a/lib/ruby_lsp/ruby_lsp_rails/test_utils.rb +++ b/lib/ruby_lsp/ruby_lsp_rails/test_utils.rb @@ -5,6 +5,8 @@ module RubyLsp module Rails module TestUtils extend T::Sig + extend T::Helpers + include Minitest::Assertions # to prevent Sorbet complaining sig { params(server: RubyLsp::Server).returns(RubyLsp::Result) } def pop_result(server) @@ -19,6 +21,8 @@ def pop_result(server) T.cast(result, RubyLsp::Result) end + # TODO: write correct sig + sig { params(message_queue: T.untyped, type: T.untyped).returns(T.untyped) } def pop_log_notification(message_queue, type) log = message_queue.pop return log if log.params.type == type @@ -27,6 +31,8 @@ def pop_log_notification(message_queue, type) log end + # TODO: write correct sig + sig { params(outgoing_queue: T.untyped, block: T.untyped).returns(T.untyped) } def pop_message(outgoing_queue, &block) message = outgoing_queue.pop return message if block.call(message)