Skip to content

Commit

Permalink
Fix missing gem spec test
Browse files Browse the repository at this point in the history
Our test for skipping RBI for missing gem specs was broken by a change
in how bundler represents specs for default gems
(rubygems/rubygems#7673), and thus changes
when they're considered "missing." Our test happened to use a default
gem, which is why it broke. However, the test doesn't rely on
the example being a default gem, so we can change it to a different
gem, which will fix the test.
  • Loading branch information
egiurleo committed Sep 18, 2024
1 parent 316688e commit d0dce80
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions spec/tapioca/cli/gem_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -706,16 +706,16 @@ class Secret; end
it "must not generate RBIs for missing gem specs" do
@project.write_gemfile!(<<~GEMFILE, append: true)
platform :rbx do
gem "ruby2_keywords", "0.0.5"
gem "psych", "=5.1.2"
end
GEMFILE

@project.bundle_install!

result = @project.tapioca("gem --all")

assert_stdout_includes(result, "completed with missing specs: ruby2_keywords (0.0.5)")
refute_includes(result.out, "Compiled ruby2_keywords")
assert_stdout_includes(result, "completed with missing specs: psych (5.1.2)")
refute_includes(result.out, "Compiled psych")

assert_empty_stderr(result)
assert_success_status(result)
Expand Down

0 comments on commit d0dce80

Please sign in to comment.