зеркало из https://github.com/github/ruby.git
[rubygems/rubygems] Added examples for warnings feature
https://github.com/rubygems/rubygems/commit/78807add23
This commit is contained in:
Родитель
0ae227ebe2
Коммит
df4ac25bd9
|
@ -1555,4 +1555,33 @@ end
|
|||
sys_exec "#{Gem.ruby} #{script}", :raise_on_error => false
|
||||
expect(out).to include("requiring foo used the monkeypatch")
|
||||
end
|
||||
|
||||
it "warn with bundled gems when it's loaded" do
|
||||
install_gemfile <<-G
|
||||
source "#{file_uri_for(gem_repo1)}"
|
||||
gem "rack"
|
||||
G
|
||||
|
||||
ruby <<-R
|
||||
require 'bundler/setup'
|
||||
require 'csv'
|
||||
R
|
||||
|
||||
expect(err).to include("csv is not part of the bundle")
|
||||
end
|
||||
|
||||
it "don't warn with bundled gems when it's declared in Gemfile" do
|
||||
install_gemfile <<-G
|
||||
source "#{file_uri_for(gem_repo1)}"
|
||||
gem "rack"
|
||||
gem "csv"
|
||||
G
|
||||
|
||||
ruby <<-R
|
||||
require 'bundler/setup'
|
||||
require 'csv'
|
||||
R
|
||||
|
||||
expect(err).to be_empty
|
||||
end
|
||||
end
|
||||
|
|
Загрузка…
Ссылка в новой задаче