1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Fixed RbConfig spec for multiarch

This commit is contained in:
Nobuyoshi Nakada 2020-03-28 16:10:32 +09:00
parent 7072e0324e
commit 8c80922c82
No known key found for this signature in database
GPG key ID: 4BC7D6DF58D8DF60

View file

@ -39,12 +39,13 @@ describe 'RbConfig::CONFIG' do
guard -> {RbConfig::TOPDIR} 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']}")
libdir = RbConfig::CONFIG[RbConfig::CONFIG['libdirname'] || 'libdir']
libruby_so = "#{libdir}/#{RbConfig::CONFIG['LIBRUBY_SO']}"
case RbConfig::CONFIG['ENABLE_SHARED']
when 'yes'
File.should.exist?(libruby_so)
when 'no'
File.should_not.exist?(libruby_so)
end
end
end