summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorHiroshi SHIBATA <[email protected]>2024-11-15 09:22:52 +0900
committerHiroshi SHIBATA <[email protected]>2024-11-15 14:04:19 +0900
commit699e710ad86a9fa3dcc7d80fcc4f71a39e65ddcd (patch)
tree2c703f33946e4f5bb932e02d5d03dc6af3c9a913 /spec
parent8e98fbdd19e49e6972d1eda1523b699b99a825f6 (diff)
Port test_no_warn_dash_gem.rb to RSpec example
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/12096
Diffstat (limited to 'spec')
-rw-r--r--spec/bundler/bundled_gems_spec.rb19
1 files changed, 19 insertions, 0 deletions
diff --git a/spec/bundler/bundled_gems_spec.rb b/spec/bundler/bundled_gems_spec.rb
index f2f908b341..90efd28194 100644
--- a/spec/bundler/bundled_gems_spec.rb
+++ b/spec/bundler/bundled_gems_spec.rb
@@ -63,4 +63,23 @@ RSpec.describe "bundled_gems.rb" do
expect(err).to include(/ostruct was loaded from (.*) from Ruby 3.5.0/)
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