Skip to content

Commit

Permalink
Fix typing
Browse files Browse the repository at this point in the history
  • Loading branch information
andyw8 committed Dec 18, 2024
1 parent 34717b8 commit 30963aa
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions spec/tapioca/addon_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,17 @@ def initialize(*args)
super(*T.unsafe(args))
FileUtils.cp("spec/dummy/bin/rails", "bin/rails")
@outgoing_queue = Thread::Queue.new
@client = T.let(nil, T.nilable(RubyLsp::Rails::RunnerClient))
FileUtils.chdir("spec/dummy") do
@client = T.let(RubyLsp::Rails::RunnerClient.new(@outgoing_queue), RubyLsp::Rails::RunnerClient)
@client = RubyLsp::Rails::RunnerClient.new(@outgoing_queue)
end
end

after(:all) do
# TODO: Remove `bind` once Sorbet understands `after(:all)`
T.bind(self, AddonSpec)

@client.shutdown
T.must(@client).shutdown

assert_predicate(@client, :stopped?)
@outgoing_queue.close
Expand All @@ -34,8 +35,8 @@ def initialize(*args)
EXPECTED_RBI_PATH = "spec/dummy/sorbet/rbi/dsl/notify_user_job.rbi"
it "generates DSL RBIs for a given constant" do
addon_path = File.expand_path("lib/ruby_lsp/tapioca/server_addon.rb")
@client.register_server_addon(File.expand_path(addon_path))
@client.delegate_notification(
T.must(@client).register_server_addon(File.expand_path(addon_path))
T.must(@client).delegate_notification(
server_addon_name: "Tapioca",
request_name: "dsl",
constants: ["NotifyUserJob"],
Expand Down

0 comments on commit 30963aa

Please sign in to comment.