Port test_no_warn_sub_feature.rb to RSpec example

This commit is contained in:
Hiroshi SHIBATA 2024-11-15 12:11:36 +09:00
parent 52e867268e
commit 8dccf5a334
Notes: git 2024-11-15 05:04:37 +00:00
3 changed files with 20 additions and 15 deletions

View File

@ -153,6 +153,26 @@ RSpec.describe "bundled_gems.rb" do
expect(err).to be_empty
end
it "Don't show warning fiddle/import when fiddle on Gemfile" do
build_lib "fiddle", "1.0.0" do |s|
s.write "lib/fiddle.rb", "puts 'fiddle'"
s.write "lib/fiddle/import.rb", "puts 'fiddle/import'"
end
script <<-RUBY, env: { "BUNDLER_SPEC_GEM_REPO" => gem_repo1.to_s }
gemfile do
source "https://gem.repo1"
path "#{lib_path}" do
gem "fiddle"
end
end
require "fiddle/import"
RUBY
expect(err).to be_empty
end
it "Don't show warning with net/smtp when net-smtp on Gemfile" do
build_lib "net-smtp", "1.0.0" do |s|
s.write "lib/net/smtp.rb", "puts 'net-smtp'"

View File

@ -12,10 +12,6 @@ echo "* Show warning with zeitwerk"
ruby test_warn_zeitwerk.rb
echo
echo "* Don't show warning bigdecimal/util when bigdecimal on Gemfile"
ruby test_no_warn_sub_feature.rb
echo
echo "* Show warning with bootsnap and some gem in Gemfile"
ruby test_warn_bootsnap_and_gem.rb
echo

View File

@ -1,11 +0,0 @@
require "bundler"
Bundler::Definition.no_lock = true
require "bundler/inline"
gemfile do
source "https://rubygems.org"
gem "bigdecimal"
end
require "bigdecimal/util"