-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
37 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# typed: true | ||
# frozen_string_literal: true | ||
|
||
require "test_helper" | ||
|
||
module RubyLsp | ||
module Rails | ||
class LaunchTest < ActiveSupport::TestCase | ||
test "launching the client succeeds" do | ||
outgoing_queue = Thread::Queue.new | ||
|
||
client = RunnerClient.create_client(outgoing_queue) | ||
refute_instance_of(NullClient, client) | ||
|
||
first = pop_log_notification(outgoing_queue, Constant::MessageType::LOG) | ||
assert_equal("Ruby LSP Rails booting server", first.params.message) | ||
|
||
second = pop_log_notification(outgoing_queue, Constant::MessageType::LOG) | ||
assert_match("Finished booting Ruby LSP Rails server", second.params.message) | ||
|
||
client.shutdown | ||
assert_predicate(client, :stopped?) | ||
outgoing_queue.close | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters