diff options
author | Hiroshi SHIBATA <[email protected]> | 2024-11-15 10:57:56 +0900 |
---|---|---|
committer | Hiroshi SHIBATA <[email protected]> | 2024-11-15 14:04:19 +0900 |
commit | 587955169e6af51eee32e34d68bc74b0dcec947c (patch) | |
tree | 305557e5e958b493075d1aaf44cdfd7c1a8647c7 /spec | |
parent | 208c46702a1045154b1f8c6d33f1a693d181f475 (diff) |
Port -r option test to RSpec examples
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/12096
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 |