diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-09-15 00:59:34 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-09-15 00:59:34 +0000 |
commit | 3ce856a602d3c79070e9c516f1be4dd053d54499 (patch) | |
tree | f7b4c9f53fb3d308b2e80031a2270be536f4a3cc /spec | |
parent | 3948372201e912e455211d4d5eb14e7c670da0b1 (diff) | |
download | ruby-3ce856a602d3c79070e9c516f1be4dd053d54499.tar.gz |
rubyspec: use mock directory
* spec/rubyspec/core/dir/mkdir_spec.rb: the source directory may
be on a read-only filesystem.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59917 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'spec')
-rw-r--r-- | spec/rubyspec/core/dir/mkdir_spec.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/rubyspec/core/dir/mkdir_spec.rb b/spec/rubyspec/core/dir/mkdir_spec.rb index ba2f12af4f..7eb8a8fe6c 100644 --- a/spec/rubyspec/core/dir/mkdir_spec.rb +++ b/spec/rubyspec/core/dir/mkdir_spec.rb @@ -55,11 +55,11 @@ describe "Dir.mkdir" do 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 |