summaryrefslogtreecommitdiff
path: root/spec/ruby/library
diff options
context:
space:
mode:
authorBenoit Daloze <eregontp@gmail.com>2021-06-02 14:34:07 +0200
committerBenoit Daloze <eregontp@gmail.com>2021-06-02 14:34:07 +0200
commit22e2a6a999b958efe5d84d9c7314e450fda82254 (patch)
treeb2dc946cf2fe2c250d0583675e548c67dca3e71a /spec/ruby/library
parenta4fbc7e2884ba694278adea3b32ddb8c2ac10efe (diff)
Update to ruby/spec@a0b7d0d
Diffstat (limited to 'spec/ruby/library')
-rw-r--r--spec/ruby/library/datetime/strftime_spec.rb1
-rw-r--r--spec/ruby/library/rbconfig/rbconfig_spec.rb8
-rw-r--r--spec/ruby/library/rubygems/gem/load_path_insert_index_spec.rb10
3 files changed, 18 insertions, 1 deletions
diff --git a/spec/ruby/library/datetime/strftime_spec.rb b/spec/ruby/library/datetime/strftime_spec.rb
index 1c925f92eb..cf07bbf9de 100644
--- a/spec/ruby/library/datetime/strftime_spec.rb
+++ b/spec/ruby/library/datetime/strftime_spec.rb
@@ -1,3 +1,4 @@
+require_relative '../../spec_helper'
require 'date'
require_relative '../../shared/time/strftime_for_date'
require_relative '../../shared/time/strftime_for_time'
diff --git a/spec/ruby/library/rbconfig/rbconfig_spec.rb b/spec/ruby/library/rbconfig/rbconfig_spec.rb
index b3b8f32edb..99b9da71e4 100644
--- a/spec/ruby/library/rbconfig/rbconfig_spec.rb
+++ b/spec/ruby/library/rbconfig/rbconfig_spec.rb
@@ -22,6 +22,12 @@ describe 'RbConfig::CONFIG' do
File.directory?(archdir).should == true
File.should.exist?("#{archdir}/etc.#{RbConfig::CONFIG['DLEXT']}")
end
+
+ 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
+ end
end
it "contains no frozen strings even with --enable-frozen-string-literal" do
@@ -36,7 +42,7 @@ describe 'RbConfig::CONFIG' do
RUBY
end
- guard -> {RbConfig::TOPDIR} do
+ 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' :
RbConfig::CONFIG['libdirname']
diff --git a/spec/ruby/library/rubygems/gem/load_path_insert_index_spec.rb b/spec/ruby/library/rubygems/gem/load_path_insert_index_spec.rb
new file mode 100644
index 0000000000..58913cddab
--- /dev/null
+++ b/spec/ruby/library/rubygems/gem/load_path_insert_index_spec.rb
@@ -0,0 +1,10 @@
+require_relative '../../../spec_helper'
+require 'rubygems'
+
+describe "Gem.load_path_insert_index" do
+ guard -> { RbConfig::TOPDIR } do
+ it "is set for an installed an installed Ruby" do
+ Gem.load_path_insert_index.should be_kind_of Integer
+ end
+ end
+end