summaryrefslogtreecommitdiff
path: root/spec/ruby/library/rbconfig
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/library/rbconfig')
-rw-r--r--spec/ruby/library/rbconfig/rbconfig_spec.rb15
1 files changed, 14 insertions, 1 deletions
diff --git a/spec/ruby/library/rbconfig/rbconfig_spec.rb b/spec/ruby/library/rbconfig/rbconfig_spec.rb
index 35b465d106..be767536fb 100644
--- a/spec/ruby/library/rbconfig/rbconfig_spec.rb
+++ b/spec/ruby/library/rbconfig/rbconfig_spec.rb
@@ -28,13 +28,26 @@ describe 'RbConfig::CONFIG' do
ruby_exe(<<-RUBY, options: '--enable-frozen-string-literal').should == "Done\n"
require 'rbconfig'
RbConfig::CONFIG.each do |k, v|
- if v.frozen?
+ # SDKROOT excluded here to workaround the issue: https://bugs.ruby-lang.org/issues/16738
+ if v.frozen? && k != 'SDKROOT'
puts "\#{k} Failure"
end
end
puts 'Done'
RUBY
end
+
+ platform_is_not :windows do
+ it "libdir/LIBRUBY_SO is the path to libruby and it exists if and only if ENABLE_SHARED" do
+ if RbConfig::CONFIG['ENABLE_SHARED'] == 'yes'
+ libdir = RbConfig::CONFIG['libdir']
+ File.should.exist?("#{libdir}/#{RbConfig::CONFIG['LIBRUBY_SO']}")
+ elsif RbConfig::CONFIG['ENABLE_SHARED'] == 'no'
+ libdir = RbConfig::CONFIG['libdir']
+ File.should_not.exist?("#{libdir}/#{RbConfig::CONFIG['LIBRUBY_SO']}")
+ end
+ end
+ end
end
describe "RbConfig::TOPDIR" do