Port test_no_warn_dash_gem.rb to RSpec example

This commit is contained in:
Hiroshi SHIBATA 2024-11-15 09:22:52 +09:00
parent 8e98fbdd19
commit 699e710ad8
Notes: git 2024-11-15 05:04:41 +00:00
3 changed files with 19 additions and 15 deletions

View File

@ -63,4 +63,23 @@ RSpec.describe "bundled_gems.rb" do
expect(err).to include(/ostruct was loaded from (.*) from Ruby 3.5.0/) expect(err).to include(/ostruct was loaded from (.*) from Ruby 3.5.0/)
end 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'"
end
script <<-RUBY, env: { "BUNDLER_SPEC_GEM_REPO" => gem_repo1.to_s }
gemfile do
source "https://gem.repo1"
path "#{lib_path}" do
gem "net-smtp"
end
end
require "net/smtp"
RUBY
expect(err).to be_empty
end
end end

View File

@ -36,10 +36,6 @@ echo "* Don't show warning bundled gems on Gemfile"
ruby test_no_warn_dependency.rb ruby test_no_warn_dependency.rb
echo echo
echo "* Don't show warning with net/smtp when net-smtp on Gemfile"
ruby test_no_warn_dash_gem.rb
echo
echo "* Don't show warning bigdecimal/util when bigdecimal on Gemfile" echo "* Don't show warning bigdecimal/util when bigdecimal on Gemfile"
ruby test_no_warn_sub_feature.rb ruby test_no_warn_sub_feature.rb
echo echo

View File

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