ruby-changes:47799
From: nobu <ko1@a...>
Date: Fri, 15 Sep 2017 09:59:42 +0900 (JST)
Subject: [ruby-changes:47799] nobu:r59917 (trunk): rubyspec: use mock directory
nobu 2017-09-15 09:59:34 +0900 (Fri, 15 Sep 2017) New Revision: 59917 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=59917 Log: rubyspec: use mock directory * spec/rubyspec/core/dir/mkdir_spec.rb: the source directory may be on a read-only filesystem. Modified files: trunk/spec/rubyspec/core/dir/mkdir_spec.rb Index: spec/rubyspec/core/dir/mkdir_spec.rb =================================================================== --- spec/rubyspec/core/dir/mkdir_spec.rb (revision 59916) +++ spec/rubyspec/core/dir/mkdir_spec.rb (revision 59917) @@ -55,11 +55,11 @@ describe "Dir.mkdir" do https://github.com/ruby/ruby/blob/trunk/spec/rubyspec/core/dir/mkdir_spec.rb#L55 end it "raises Errno::EEXIST if the specified directory already exists" do - lambda { Dir.mkdir(File.dirname(__FILE__)) }.should raise_error(Errno::EEXIST) + lambda { Dir.mkdir("#{DirSpecs.mock_dir}/dir") }.should raise_error(Errno::EEXIST) end it "raises Errno::EEXIST if the argument points to the existing file" do - lambda { Dir.mkdir(__FILE__) }.should raise_error(Errno::EEXIST) + lambda { Dir.mkdir("#{DirSpecs.mock_dir}/file_one.ext") }.should raise_error(Errno::EEXIST) end end -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/