Port bundle exec warning check to RSpec example

This commit is contained in:
Hiroshi SHIBATA 2024-11-15 10:40:40 +09:00
parent 49fde29f77
commit 703cffffc9
Notes: git 2024-11-15 05:04:39 +00:00
3 changed files with 12 additions and 5 deletions

View File

@ -62,6 +62,18 @@ RSpec.describe "bundled_gems.rb" do
expect(err).to include("You can add net-smtp")
end
it "Show warning when bundle exec with ruby and script" do
code = <<-RUBY
require "ostruct"
RUBY
create_file("script.rb", code)
create_file("Gemfile", "source 'https://rubygems.org'")
bundle "exec ruby script.rb"
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

View File

@ -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 ruby and script"
bundle exec ruby test_warn_bundle_exec.rb
echo
echo "* Show warning when bundle exec with shebang's script"
bundle exec ./test_warn_bundle_exec_shebang.rb
echo

View File

@ -1 +0,0 @@
require "base64"