Class: File

Inherits:
Object
  • Object
show all
Defined in:
lib/rspec_fixtures/extensions/file.rb

Class Method Summary collapse

Class Method Details

.deep_write(file, content) ⇒ Object



4
5
6
7
8
# File 'lib/rspec_fixtures/extensions/file.rb', line 4

def self.deep_write(file, content)
  dir = File.dirname file
  FileUtils.mkdir_p dir unless Dir.exist? dir
  File.write file, content
end