Skip to content

Commit

Permalink
wip test fix against CI
Browse files Browse the repository at this point in the history
  • Loading branch information
alexcrocha committed Jan 8, 2025
1 parent b0ab3d6 commit a037eac
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
4 changes: 3 additions & 1 deletion lib/ruby_lsp/tapioca/run_gem_rbi_check.rb
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,9 @@ def execute_tapioca_gem_command(gems)
# Resetting BUNDLE_GEMFILE to root folder to use the project's Gemfile instead of Ruby LSP's composed Gemfile
stdout, stderr, status = T.unsafe(Open3).capture3(
{ "BUNDLE_GEMFILE" => "Gemfile" },
"bin/tapioca",
"bundle",
"exec",
"tapioca",
"gem",
"--lsp_addon",
*gems,
Expand Down
8 changes: 7 additions & 1 deletion spec/tapioca/ruby_lsp/run_gem_rbi_check_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,28 @@ module Foo
end

after do
ENV["BUNDLE_GEMFILE"] = nil
project.write_gemfile!(project.tapioca_gemfile)
@project.require_default_gems
project.remove!("sorbet/rbi")
project.remove!("../gems")
project.remove!(".git")
project.remove!("sorbet/tapioca/require.rb")
project.remove!("config/application.rb")
project.remove!(".bundle")
project.remove!("Gemfile.lock")
ensure
@project.remove!("output")
end

def setup_git_repo
@project.exec("git init")
@project.exec("git config user.email '[email protected]'")
@project.exec("git config user.name 'Test User'")
@project.exec("touch Gemfile.lock")
FileUtils.mkdir_p("#{@project.absolute_path}/sorbet/rbi/gems")
@project.exec("git add . && git commit -m 'Initial commit'")
@project.exec("git add .")
@project.exec("git commit -m 'Initial commit'")
end

it "does nothing if there is no git repo" do
Expand Down

0 comments on commit a037eac

Please sign in to comment.