diff --git a/spec/ruby/core/dir/home_spec.rb b/spec/ruby/core/dir/home_spec.rb index 8935eb4f4b..e08722df88 100644 --- a/spec/ruby/core/dir/home_spec.rb +++ b/spec/ruby/core/dir/home_spec.rb @@ -14,9 +14,15 @@ describe "Dir.home" do Dir.home.should == home_directory end - platform_is_not :windows do + platform_is :solaris do it "returns the named user's home directory, from the user database, as a string if called with an argument" do - Dir.home(ENV['USER']).should == `/bin/echo ~#{ENV['USER']}`.chomp + Dir.home(ENV['USER']).should == `getent passwd ~#{ENV['USER']}|cut -d: -f6`.chomp + end + end + + platform_is_not :windows, :solaris do + it "returns the named user's home directory, from the user database, as a string if called with an argument" do + Dir.home(ENV['USER']).should == `echo ~#{ENV['USER']}`.chomp end end