diff options
Diffstat (limited to 'spec')
-rw-r--r-- | spec/bundler/bundled_gems_spec.rb | 15 |
1 files changed, 15 insertions, 0 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 |