summaryrefslogtreecommitdiff
path: root/spec/ruby/library/rbconfig/rbconfig_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/library/rbconfig/rbconfig_spec.rb')
-rw-r--r--spec/ruby/library/rbconfig/rbconfig_spec.rb13
1 files changed, 12 insertions, 1 deletions
diff --git a/spec/ruby/library/rbconfig/rbconfig_spec.rb b/spec/ruby/library/rbconfig/rbconfig_spec.rb
index 99b9da71e4..b90cc90970 100644
--- a/spec/ruby/library/rbconfig/rbconfig_spec.rb
+++ b/spec/ruby/library/rbconfig/rbconfig_spec.rb
@@ -26,7 +26,7 @@ describe 'RbConfig::CONFIG' do
it "['sitelibdir'] is set and is part of $LOAD_PATH" do
sitelibdir = RbConfig::CONFIG['sitelibdir']
sitelibdir.should be_kind_of String
- $LOAD_PATH.should.include? sitelibdir
+ $LOAD_PATH.map{|path| File.realpath(path) rescue path }.should.include? sitelibdir
end
end
@@ -42,6 +42,17 @@ describe 'RbConfig::CONFIG' do
RUBY
end
+ platform_is_not :windows do
+ it "['LIBRUBY'] is the same as LIBRUBY_SO if and only if ENABLE_SHARED" do
+ case RbConfig::CONFIG['ENABLE_SHARED']
+ when 'yes'
+ RbConfig::CONFIG['LIBRUBY'].should == RbConfig::CONFIG['LIBRUBY_SO']
+ when 'no'
+ RbConfig::CONFIG['LIBRUBY'].should_not == RbConfig::CONFIG['LIBRUBY_SO']
+ end
+ end
+ end
+
guard -> { RbConfig::TOPDIR } do
it "libdir/LIBRUBY_SO is the path to libruby and it exists if and only if ENABLE_SHARED" do
libdirname = RbConfig::CONFIG['LIBPATHENV'] == 'PATH' ? 'bindir' :