diff options
author | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-10-20 09:03:37 +0000 |
---|---|---|
committer | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-10-20 09:03:37 +0000 |
commit | e26d0e605c3d274531433ce6bfd9ee0f5077b0a3 (patch) | |
tree | de7fdcc12d7625ee8c7e25ffd73a015c651104a5 /test/rubygems | |
parent | a5aeb91586da1ef357638f96cba06b5701163001 (diff) | |
download | ruby-e26d0e605c3d274531433ce6bfd9ee0f5077b0a3.tar.gz |
Merge rubygems master(ddbf3203f3857649abe95c73edefc7de7e6ecff4).
It fixed: https://github.com/rubygems/rubygems/issues/2041
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60219 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rubygems')
-rw-r--r-- | test/rubygems/test_gem_stream_ui.rb | 12 | ||||
-rw-r--r-- | test/rubygems/test_gem_stub_specification.rb | 12 |
2 files changed, 18 insertions, 6 deletions
diff --git a/test/rubygems/test_gem_stream_ui.rb b/test/rubygems/test_gem_stream_ui.rb index 9518ebc88e..51fd51c474 100644 --- a/test/rubygems/test_gem_stream_ui.rb +++ b/test/rubygems/test_gem_stream_ui.rb @@ -37,7 +37,7 @@ class TestGemStreamUI < Gem::TestCase def test_ask skip 'TTY detection broken on windows' if - Gem.win_platform? unless RUBY_VERSION > '1.9.2' + Gem.win_platform? && RUBY_VERSION <= '1.9.2' Timeout.timeout(1) do expected_answer = "Arthur, King of the Britons" @@ -49,7 +49,7 @@ class TestGemStreamUI < Gem::TestCase def test_ask_no_tty skip 'TTY detection broken on windows' if - Gem.win_platform? unless RUBY_VERSION > '1.9.2' + Gem.win_platform? && RUBY_VERSION <= '1.9.2' @in.tty = false @@ -61,7 +61,7 @@ class TestGemStreamUI < Gem::TestCase def test_ask_for_password skip 'Always uses $stdin on windows' if - Gem.win_platform? unless RUBY_VERSION > '1.9.2' + Gem.win_platform? && RUBY_VERSION <= '1.9.2' Timeout.timeout(1) do expected_answer = "Arthur, King of the Britons" @@ -73,7 +73,7 @@ class TestGemStreamUI < Gem::TestCase def test_ask_for_password_no_tty skip 'TTY handling is broken on windows' if - Gem.win_platform? unless RUBY_VERSION > '1.9.2' + Gem.win_platform? && RUBY_VERSION <= '1.9.2' @in.tty = false @@ -85,7 +85,7 @@ class TestGemStreamUI < Gem::TestCase def test_ask_yes_no_no_tty_with_default skip 'TTY handling is broken on windows' if - Gem.win_platform? unless RUBY_VERSION > '1.9.2' + Gem.win_platform? && RUBY_VERSION <= '1.9.2' @in.tty = false @@ -100,7 +100,7 @@ class TestGemStreamUI < Gem::TestCase def test_ask_yes_no_no_tty_without_default skip 'TTY handling is broken on windows' if - Gem.win_platform? unless RUBY_VERSION > '1.9.2' + Gem.win_platform? && RUBY_VERSION <= '1.9.2' @in.tty = false diff --git a/test/rubygems/test_gem_stub_specification.rb b/test/rubygems/test_gem_stub_specification.rb index 53b9dab02d..43680265c7 100644 --- a/test/rubygems/test_gem_stub_specification.rb +++ b/test/rubygems/test_gem_stub_specification.rb @@ -110,6 +110,18 @@ class TestStubSpecification < Gem::TestCase assert_equal code_rb, stub.matches_for_glob('code*').first end + def test_matches_for_glob_with_bundler_inline + stub = stub_with_extension + code_rb = File.join stub.gem_dir, 'lib', 'code.rb' + FileUtils.mkdir_p File.dirname code_rb + FileUtils.touch code_rb + + stub.stub(:raw_require_paths, nil) do + assert_equal code_rb, stub.matches_for_glob('code*').first + end + end + + def test_missing_extensions_eh stub = stub_with_extension do |s| extconf_rb = File.join s.gem_dir, s.extensions.first |