Sha256: 307ef9d0c63c0ac313b60ab4db5ee603faa11cc91bef7fadb131b7b5f306751a

Contents?: true

Size: 330 Bytes

Versions: 6

Compression:

Stored size: 330 Bytes

Contents

module Helpers
  module FileSystem
    def write_file(file_name, contents)
      write_directory(TMP_ROOT)
      ::File.open(file_name.to_s, 'w') {|f| f.write(contents) }
    end
    
    def write_directory(name)
      FileUtils.mkdir_p(name)
    end

    def delete_directory(name)
      FileUtils.rm_rf(name)
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
generator_spec-0.10.0 spec/support/file_system.rb
generator_spec-0.9.5 spec/support/file_system.rb
generator_spec-0.9.4 spec/support/file_system.rb
generator_spec-0.9.3 spec/support/file_system.rb
generator_spec-0.9.2 spec/support/file_system.rb
generator_spec-0.9.1 spec/support/file_system.rb