madpilot-fakefs 0.1.4 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/lib/fakefs/dir.rb CHANGED
@@ -108,7 +108,7 @@ module FakeFS
108
108
  class << self
109
109
  alias_method :getwd, :pwd
110
110
  alias_method :rmdir, :delete
111
- alias_method :unline, :delete
111
+ alias_method :unlink, :delete
112
112
  end
113
113
  end
114
114
  end
@@ -9,7 +9,11 @@ module FakeFS
9
9
  def rmdir(list, options = {})
10
10
  list = [ list ] unless list.is_a?(Array)
11
11
  list.each do |l|
12
+ parent = l.split('/')
13
+ parent.pop
14
+ raise Errno::ENOENT, "No such file or directory - #{l}" unless parent.join == "" || FileSystem.find(parent.join('/'))
12
15
  raise Errno::ENOENT, l unless FileSystem.find(l)
16
+ raise Errno::ENOTEMPTY, l unless FileSystem.find(l).values.empty?
13
17
  rm(l)
14
18
  end
15
19
  end
@@ -17,6 +21,7 @@ module FakeFS
17
21
  def rm(path)
18
22
  FileSystem.delete(path)
19
23
  end
24
+
20
25
  alias_method :rm_rf, :rm
21
26
  alias_method :rm_r, :rm
22
27
 
@@ -1,6 +1,6 @@
1
1
  module FakeFS
2
2
  module Version
3
- VERSION = "0.1.4"
3
+ VERSION = "0.1.5"
4
4
 
5
5
  def self.to_s
6
6
  VERSION
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: madpilot-fakefs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Wanstrath
@@ -42,7 +42,6 @@ files:
42
42
  - test/verify.rb
43
43
  has_rdoc: false
44
44
  homepage: http://github.com/defunkt/fakefs
45
- licenses:
46
45
  post_install_message:
47
46
  rdoc_options:
48
47
  - --charset=UTF-8
@@ -63,7 +62,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
63
62
  requirements: []
64
63
 
65
64
  rubyforge_project:
66
- rubygems_version: 1.3.5
65
+ rubygems_version: 1.2.0
67
66
  signing_key:
68
67
  specification_version: 2
69
68
  summary: A fake filesystem. Use it in your tests.