Class MockFS::MockFileSystem
In: mockfs.rb
Parent: Object

The MockFileSystem is the singleton class that pretends to be the file system in mock mode. When it’s first created, it fills in one path up to your real directory location; other paths will have to be filled by hand using fill_path.

Methods

fill_path   flush   flush  

Included Modules

Singleton

Classes and Modules

Class MockFS::MockFileSystem::MockDir
Class MockFS::MockFileSystem::MockFile

Public Class methods

Flushes all file information out of the MockFileSystem.

Public Instance methods

Use this method to fill in directory paths. This is the same as calling mkdir a bunch of times.

  MockFS.mock_file_system.fill_path '/usr/local/bin'
  MockFS.mock_file_system.fill_path '/home/francis/Desktop/myproject/'

Flushes all file information out of the MockFileSystem.

[Validate]