diff options
Diffstat (limited to 'test/rubygems/test_gem_specification.rb')
-rw-r--r-- | test/rubygems/test_gem_specification.rb | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/test/rubygems/test_gem_specification.rb b/test/rubygems/test_gem_specification.rb index 2a84d88346..0f00dd5d42 100644 --- a/test/rubygems/test_gem_specification.rb +++ b/test/rubygems/test_gem_specification.rb @@ -6,6 +6,7 @@ require 'stringio' require 'rubygems/ext' require 'rubygems/specification' require 'rubygems/installer' +require 'rubygems/platform' class TestGemSpecification < Gem::TestCase @@ -59,12 +60,13 @@ end end end - def ext_spec + def ext_spec(platform: Gem::Platform::RUBY) @ext = util_spec 'ext', '1' do |s| s.executable = 'exec' s.test_file = 'test/suite.rb' s.extensions = %w[ext/extconf.rb] s.license = 'MIT' + s.platform = platform s.mark_version s.files = %w[lib/code.rb] @@ -1673,6 +1675,16 @@ dependencies: [] assert_equal expected, err end + def test_contains_requirable_file_eh_extension + ext_spec(platform: Gem::Platform.new("java")) + + _, err = capture_io do + refute @ext.contains_requirable_file? 'nonexistent' + end + + assert_empty err + end + def test_date assert_equal Gem::Specification::TODAY, @a1.date end |