mockfs 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/mockfs.rb +4 -2
- data/lib/mockfs.rb~ +2 -2
- metadata +1 -1
data/lib/mockfs.rb
CHANGED
@@ -94,7 +94,7 @@ require 'fileutils'
|
|
94
94
|
require 'singleton'
|
95
95
|
|
96
96
|
module MockFS
|
97
|
-
Version = '0.1.
|
97
|
+
Version = '0.1.5'
|
98
98
|
|
99
99
|
@@mock = false
|
100
100
|
|
@@ -312,7 +312,9 @@ module MockFS
|
|
312
312
|
def self.read( name )
|
313
313
|
mfile = node name
|
314
314
|
raise Errno::EISDIR if mfile.is_a? MockFileSystem::MockDir
|
315
|
-
mfile.read
|
315
|
+
contents = mfile.read
|
316
|
+
mfile.rewind
|
317
|
+
contents
|
316
318
|
end
|
317
319
|
|
318
320
|
class Mode #:nodoc:
|
data/lib/mockfs.rb~
CHANGED
@@ -94,7 +94,7 @@ require 'fileutils'
|
|
94
94
|
require 'singleton'
|
95
95
|
|
96
96
|
module MockFS
|
97
|
-
Version = '0.1.
|
97
|
+
Version = '0.1.4'
|
98
98
|
|
99
99
|
@@mock = false
|
100
100
|
|
@@ -369,7 +369,7 @@ module MockFS
|
|
369
369
|
rescue Errno::ENOENT
|
370
370
|
path = Path.new( file ).absolute
|
371
371
|
parent_dir = node( path.parent )
|
372
|
-
file = MockFileSystem::MockFile.new( parent_dir, path.node,
|
372
|
+
file = MockFileSystem::MockFile.new( parent_dir, path.node, '' )
|
373
373
|
parent_dir[path.node] = file
|
374
374
|
end
|
375
375
|
end
|
metadata
CHANGED
@@ -3,7 +3,7 @@ rubygems_version: 0.8.11
|
|
3
3
|
specification_version: 1
|
4
4
|
name: mockfs
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.1.
|
6
|
+
version: 0.1.5
|
7
7
|
date: 2006-12-31 00:00:00 -05:00
|
8
8
|
summary: MockFS is a test-obsessed library for mocking out the entire file system.
|
9
9
|
require_paths:
|