1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
This commit is contained in:
Benoit Daloze 2019-04-27 19:23:45 +02:00
parent 14f004d396
commit 5b93321064

View file

@ -2,6 +2,7 @@
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
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