Merge branch 'master' of github.com:defunkt/fakefs
This commit is contained in:
commit
25e47887b0
@ -5,6 +5,7 @@ module FakeFS
|
|||||||
def mkdir_p(path)
|
def mkdir_p(path)
|
||||||
FileSystem.add(path, FakeDir.new)
|
FileSystem.add(path, FakeDir.new)
|
||||||
end
|
end
|
||||||
|
alias_method :mkpath, :mkdir_p
|
||||||
|
|
||||||
def rmdir(list, options = {})
|
def rmdir(list, options = {})
|
||||||
list = [ list ] unless list.is_a?(Array)
|
list = [ list ] unless list.is_a?(Array)
|
||||||
|
@ -24,6 +24,11 @@ class FakeFSTest < Test::Unit::TestCase
|
|||||||
FileUtils.mkdir_p("/path/to/dir")
|
FileUtils.mkdir_p("/path/to/dir")
|
||||||
assert_kind_of FakeDir, FileSystem.fs['path']['to']['dir']
|
assert_kind_of FakeDir, FileSystem.fs['path']['to']['dir']
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_can_create_directories_with_mkpath
|
||||||
|
FileUtils.mkpath("/path/to/dir")
|
||||||
|
assert_kind_of FakeDir, FileSystem.fs['path']['to']['dir']
|
||||||
|
end
|
||||||
|
|
||||||
def test_can_delete_directories
|
def test_can_delete_directories
|
||||||
FileUtils.mkdir_p("/path/to/dir")
|
FileUtils.mkdir_p("/path/to/dir")
|
||||||
|
Loading…
Reference in New Issue
Block a user