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 | 22d56b63297dccc30ba19e5579c23fd5256bceb6 (patch) | |
tree | f7b4c9f53fb3d308b2e80031a2270be536f4a3cc | |
parent | dd7c475e5e92e8b617de521256f4346be48c90d4 (diff) | |
download | ruby-22d56b63297dccc30ba19e5579c23fd5256bceb6.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
-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 |