mnoble-fakefs 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- data/fakefs.gemspec +1 -1
- data/lib/fakefs/dir.rb +1 -1
- data/test/fakefs_test.rb +5 -0
- metadata +3 -5
data/fakefs.gemspec
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{mnoble-fakefs}
|
8
|
-
s.version = "0.3.
|
8
|
+
s.version = "0.3.2"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Chris Wanstrath", "Scott Taylor", "Jeff Hodges", "Pat Nakajima"]
|
data/lib/fakefs/dir.rb
CHANGED
@@ -86,7 +86,7 @@ module FakeFS
|
|
86
86
|
def self.mkdir(string, integer = 0)
|
87
87
|
parent = string.split('/')
|
88
88
|
parent.pop
|
89
|
-
raise Errno::ENOENT, "No such file or directory - #{string}" unless parent.join == "" || FileSystem.find(parent.join('/'))
|
89
|
+
raise Errno::ENOENT, "No such file or directory - #{string}" unless parent.join == "" || parent.join == "." || FileSystem.find(parent.join('/'))
|
90
90
|
raise Errno::EEXIST, "File exists - #{string}" if File.exists?(string)
|
91
91
|
FileUtils.mkdir_p(string)
|
92
92
|
end
|
data/test/fakefs_test.rb
CHANGED
@@ -1123,6 +1123,11 @@ class FakeFSTest < Test::Unit::TestCase
|
|
1123
1123
|
assert dir.pos == 2
|
1124
1124
|
assert d == '..'
|
1125
1125
|
end
|
1126
|
+
|
1127
|
+
def test_can_create_directories_starting_with_dot
|
1128
|
+
Dir.mkdir './path'
|
1129
|
+
assert File.exists? './path'
|
1130
|
+
end
|
1126
1131
|
|
1127
1132
|
def test_directory_read_past_length
|
1128
1133
|
test = ['.', '..', 'file_1', 'file_2', 'file_3', 'file_4', 'file_5' ]
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: mnoble-fakefs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.3.
|
5
|
+
version: 0.3.2
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Chris Wanstrath
|
@@ -13,8 +13,7 @@ autorequire:
|
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
15
|
|
16
|
-
date: 2010-12-18 00:00:00
|
17
|
-
default_executable:
|
16
|
+
date: 2010-12-18 00:00:00 Z
|
18
17
|
dependencies: []
|
19
18
|
|
20
19
|
description: A fake filesystem. Use it in your tests. (Updates to support mkdir)
|
@@ -61,7 +60,6 @@ files:
|
|
61
60
|
- test/safe_test.rb
|
62
61
|
- test/test_helper.rb
|
63
62
|
- test/verify.rb
|
64
|
-
has_rdoc: true
|
65
63
|
homepage: http://github.com/defunkt/fakefs
|
66
64
|
licenses: []
|
67
65
|
|
@@ -85,7 +83,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
85
83
|
requirements: []
|
86
84
|
|
87
85
|
rubyforge_project:
|
88
|
-
rubygems_version: 1.
|
86
|
+
rubygems_version: 1.7.2
|
89
87
|
signing_key:
|
90
88
|
specification_version: 3
|
91
89
|
summary: A fake filesystem. Use it in your tests.
|