diff options
author | eregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-10-28 15:15:48 +0000 |
---|---|---|
committer | eregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-10-28 15:15:48 +0000 |
commit | 8c5b60eb22d6d661e87992a65d54e3a5bc0aeed4 (patch) | |
tree | 7905b284cb5b3d62c17ad8a939e339621a498a2c /spec/ruby/library/etc/getlogin_spec.rb | |
parent | 6530b14cee76e2512424d225e64d3c61dd1f6511 (diff) | |
download | ruby-8c5b60eb22d6d661e87992a65d54e3a5bc0aeed4.tar.gz |
Update to ruby/spec@a6b8805
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60525 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'spec/ruby/library/etc/getlogin_spec.rb')
-rw-r--r-- | spec/ruby/library/etc/getlogin_spec.rb | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/spec/ruby/library/etc/getlogin_spec.rb b/spec/ruby/library/etc/getlogin_spec.rb index ae52942a92..43e654bda6 100644 --- a/spec/ruby/library/etc/getlogin_spec.rb +++ b/spec/ruby/library/etc/getlogin_spec.rb @@ -11,9 +11,15 @@ describe "Etc.getlogin" do # make Etc.getlogin to return nil if getlogin(3) returns NULL envuser, ENV['USER'] = ENV['USER'], nil if Etc.getlogin - # Etc.getlogin returns the same result of logname(2) - # if it returns non NULL - Etc.getlogin.should == `id -un`.chomp + if ENV['TRAVIS'] and platform_is(:darwin) + # See https://travis-ci.org/ruby/spec/jobs/285967744 + # and https://travis-ci.org/ruby/spec/jobs/285999602 + Etc.getlogin.should be_an_instance_of(String) + else + # Etc.getlogin returns the same result of logname(2) + # if it returns non NULL + Etc.getlogin.should == `id -un`.chomp + end else # Etc.getlogin may return nil if the login name is not set # because of chroot or sudo or something. |