summaryrefslogtreecommitdiff
path: root/test/rubygems/test_gem.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/rubygems/test_gem.rb')
-rw-r--r--test/rubygems/test_gem.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/rubygems/test_gem.rb b/test/rubygems/test_gem.rb
index a320d54884..88d0b1c432 100644
--- a/test/rubygems/test_gem.rb
+++ b/test/rubygems/test_gem.rb
@@ -338,6 +338,24 @@ class TestGem < Gem::TestCase
end
end
+ def test_self_extension_install_dir_shared
+ enable_shared, RbConfig::CONFIG['ENABLE_SHARED'] =
+ RbConfig::CONFIG['ENABLE_SHARED'], 'yes'
+
+ assert_equal Gem.ruby_api_version, Gem.extension_api_version
+ ensure
+ RbConfig::CONFIG['ENABLE_SHARED'] = enable_shared
+ end
+
+ def test_self_extension_install_dir_static
+ enable_shared, RbConfig::CONFIG['ENABLE_SHARED'] =
+ RbConfig::CONFIG['ENABLE_SHARED'], 'no'
+
+ assert_equal "#{Gem.ruby_api_version}-static", Gem.extension_api_version
+ ensure
+ RbConfig::CONFIG['ENABLE_SHARED'] = enable_shared
+ end
+
def test_self_find_files
cwd = File.expand_path("test/rubygems", @@project_dir)
$LOAD_PATH.unshift cwd