summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--spec/bundler/bundled_gems_spec.rb15
-rw-r--r--tool/test_for_warn_bundled_gems/Gemfile0
-rw-r--r--tool/test_for_warn_bundled_gems/Gemfile.lock11
-rwxr-xr-xtool/test_for_warn_bundled_gems/test.sh8
4 files changed, 15 insertions, 19 deletions
diff --git a/spec/bundler/bundled_gems_spec.rb b/spec/bundler/bundled_gems_spec.rb
index 1ed27a1746..05f669d717 100644
--- a/spec/bundler/bundled_gems_spec.rb
+++ b/spec/bundler/bundled_gems_spec.rb
@@ -88,6 +88,13 @@ RSpec.describe "bundled_gems.rb" do
expect(err).to include(/ostruct was loaded from (.*) from Ruby 3.5.0/)
end
+ it "Show warning when bundle exec with -r option" do
+ create_file("Gemfile", "source 'https://rubygems.org'")
+ bundle "exec ruby -rostruct -e ''"
+
+ expect(err).to include(/ostruct was loaded from (.*) from Ruby 3.5.0/)
+ end
+
it "Show warning when warn is not the standard one in the current scope" do
script <<-RUBY
module My
@@ -152,4 +159,12 @@ RSpec.describe "bundled_gems.rb" do
expect(err).to be_empty
end
+
+ it "Don't show warning for reline when using irb from standard library" do
+ create_file("Gemfile", "source 'https://rubygems.org'")
+ bundle "exec ruby -rirb -e ''"
+
+ expect(err).to include(/irb was loaded from (.*) from Ruby 3.5.0/)
+ expect(err).to_not include(/reline was loaded from (.*) from Ruby 3.5.0/)
+ end
end
diff --git a/tool/test_for_warn_bundled_gems/Gemfile b/tool/test_for_warn_bundled_gems/Gemfile
deleted file mode 100644
index e69de29bb2..0000000000
--- a/tool/test_for_warn_bundled_gems/Gemfile
+++ /dev/null
diff --git a/tool/test_for_warn_bundled_gems/Gemfile.lock b/tool/test_for_warn_bundled_gems/Gemfile.lock
deleted file mode 100644
index 003cb81444..0000000000
--- a/tool/test_for_warn_bundled_gems/Gemfile.lock
+++ /dev/null
@@ -1,11 +0,0 @@
-GEM
- specs:
-
-PLATFORMS
- arm64-darwin-22
- ruby
-
-DEPENDENCIES
-
-BUNDLED WITH
- 2.5.0.dev
diff --git a/tool/test_for_warn_bundled_gems/test.sh b/tool/test_for_warn_bundled_gems/test.sh
index 35067da40a..3813a4d268 100755
--- a/tool/test_for_warn_bundled_gems/test.sh
+++ b/tool/test_for_warn_bundled_gems/test.sh
@@ -4,10 +4,6 @@ echo "* Show warning sub-feature like bigdecimal/util"
ruby test_warn_sub_feature.rb
echo
-echo "* Show warning when bundle exec with -r option"
-bundle exec ruby -rostruct -e ''
-echo
-
echo "* Show warning with bootsnap"
ruby test_warn_bootsnap.rb
echo
@@ -27,7 +23,3 @@ echo
echo "* Show warning with bootsnap and some gem in Gemfile"
ruby test_warn_bootsnap_and_gem.rb
echo
-
-echo "* Don't show warning for reline when using irb from standard library"
-bundle exec ruby -rirb -e ''
-echo