ruby-changes:55566
From: Benoit <ko1@a...>
Date: Sun, 28 Apr 2019 02:24:09 +0900 (JST)
Subject: [ruby-changes:55566] Benoit Daloze:5b93321064 (trunk): Update to ruby/spec@14e6148
https://git.ruby-lang.org/ruby.git/commit/?id=5b93321064 From 5b93321064e83ea180492469071189372e8289e8 Mon Sep 17 00:00:00 2001 From: Benoit Daloze <eregontp@g...> Date: Sat, 27 Apr 2019 19:23:45 +0200 Subject: Update to ruby/spec@14e6148 diff --git a/spec/ruby/core/file/expand_path_spec.rb b/spec/ruby/core/file/expand_path_spec.rb index b03bb3a..c2899fe 100644 --- a/spec/ruby/core/file/expand_path_spec.rb +++ b/spec/ruby/core/file/expand_path_spec.rb @@ -2,6 +2,7 @@ https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/file/expand_path_spec.rb#L2 require_relative '../../spec_helper' require_relative 'fixtures/common' +require 'etc' describe "File.expand_path" do before :each do @@ -222,14 +223,16 @@ platform_is_not :windows do https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/file/expand_path_spec.rb#L223 ENV["HOME"] = @home end - it "uses the user database when passed '~' if HOME is nil" do - ENV.delete "HOME" - File.directory?(File.expand_path("~")).should == true - end + guard -> { Etc.getlogin } do + it "uses the user database when passed '~' if HOME is nil" do + ENV.delete "HOME" + File.directory?(File.expand_path("~")).should == true + end - it "uses the user database when passed '~/' if HOME is nil" do - ENV.delete "HOME" - File.directory?(File.expand_path("~/")).should == true + it "uses the user database when passed '~/' if HOME is nil" do + ENV.delete "HOME" + File.directory?(File.expand_path("~/")).should == true + end end it "raises an ArgumentError when passed '~' if HOME == ''" do -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/