aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test
diff options
context:
space:
mode:
authorMarc Savy2016-09-20 11:50:27 +0100
committerMarc Savy2016-09-20 12:17:44 +0100
commit7fc241765e3654718235791c32e5638bf7f8e15a (patch)
tree6fef185c73df4a3025f78b21c0ffacbfdf430675 /Library/Homebrew/test
parent7a63a753609558e14f20080dd7ab5f4fc6e3f985 (diff)
downloadbrew-7fc241765e3654718235791c32e5638bf7f8e15a.tar.bz2
Make mkdir wrapper use mkdir_p to create intermediate directories
Diffstat (limited to 'Library/Homebrew/test')
-rw-r--r--Library/Homebrew/test/test_pathname.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/Library/Homebrew/test/test_pathname.rb b/Library/Homebrew/test/test_pathname.rb
index 0cd2876d0..bc13241a7 100644
--- a/Library/Homebrew/test/test_pathname.rb
+++ b/Library/Homebrew/test/test_pathname.rb
@@ -257,4 +257,11 @@ class PathnameInstallTests < Homebrew::TestCase
@dst.install_symlink "foo" => "bar"
assert_equal Pathname.new("foo"), (@dst/"bar").readlink
end
+
+ def test_mkdir_creates_intermediate_directories
+ mkdir @dst/"foo/bar/baz" do
+ assert_predicate @dst/"foo/bar/baz", :exist?, "foo/bar/baz was not created"
+ assert_predicate @dst/"foo/bar/baz", :directory?, "foo/bar/baz was not a directory structure"
+ end
+ end
end