зеркало из https://github.com/github/ruby.git
Port test_warn_dash_gem.rb to RSpec example
This commit is contained in:
Родитель
b44272fcb4
Коммит
1063b5a140
|
@ -22,4 +22,20 @@ RSpec.describe "bundled_gems.rb" do
|
|||
expect(err).to include(/csv was loaded from (.*) from Ruby 3.4.0/)
|
||||
expect(err).to include(/ostruct was loaded from (.*) from Ruby 3.5.0/)
|
||||
end
|
||||
|
||||
it "Show warning dash gem like net/smtp" do
|
||||
script <<-RUBY
|
||||
gemfile do
|
||||
source "https://rubygems.org"
|
||||
end
|
||||
|
||||
begin
|
||||
require "net/smtp"
|
||||
rescue LoadError
|
||||
end
|
||||
RUBY
|
||||
|
||||
expect(err).to include(/net\/smtp was loaded from (.*) from Ruby 3.1.0/)
|
||||
expect(err).to include("You can add net-smtp")
|
||||
end
|
||||
end
|
||||
|
|
|
@ -8,10 +8,6 @@ echo "* Show warning sub-feature like bigdecimal/util"
|
|||
ruby test_warn_sub_feature.rb
|
||||
echo
|
||||
|
||||
echo "* Show warning dash gem like net/smtp"
|
||||
ruby test_warn_dash_gem.rb
|
||||
echo
|
||||
|
||||
echo "* Show warning when bundle exec with ruby and script"
|
||||
bundle exec ruby test_warn_bundle_exec.rb
|
||||
echo
|
||||
|
|
|
@ -1,10 +0,0 @@
|
|||
require "bundler"
|
||||
Bundler::Definition.no_lock = true
|
||||
|
||||
require "bundler/inline"
|
||||
|
||||
gemfile do
|
||||
source "https://rubygems.org"
|
||||
end
|
||||
|
||||
require "net/smtp"
|
Загрузка…
Ссылка в новой задаче