Sha256: 21e6befec6e5c4c5c617f5acd3d2108ad74c769fb25bc1705b1081e3f18cea7a
Contents?: true
Size: 566 Bytes
Versions: 2
Compression:
Stored size: 566 Bytes
Contents
module GeneratorSupport def create_file(file_path, content = '') full_file_path = File.expand_path(file_path, destination_root) FileUtils.mkdir_p File.dirname(full_file_path) File.write full_file_path, content end def touch_file(file_path) full_file_path = File.expand_path(file_path, destination_root) FileUtils.mkdir_p File.dirname(full_file_path) FileUtils.touch full_file_path end def cleanup_destination_root FileUtils.rm_rf destination_root end def content_for(file_name) File.read(file(file_name)) end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
sharing_tags-0.0.9 | spec/support/generator_support.rb |
sharing_tags-0.0.8 | spec/support/generator_support.rb |