Sha256: 211e507b9e22264f55f52641564691d46673775245351e5a8d8f2d586ee5e358
Contents?: true
Size: 784 Bytes
Versions: 10
Compression:
Stored size: 784 Bytes
Contents
require 'tap/generator/generators/task/task_generator' module Tap::Generator::Generators # :startdoc::generator a file_task and test # # Generates a new Tap::FileTask and associated test files. class FileTaskGenerator < TaskGenerator def manifest(m, const_name) const = super if test test_dir = app.filepath('test', const.path, "test_#{const.basename}") m.directories test_dir, %W{ input expected } m.template File.join(test_dir, 'input/file.txt'), "file.txt", :const => const, :test_dir => test_dir m.template File.join(test_dir, 'expected/result.yml'), "result.yml", :const => const, :test_dir => test_dir end end end end
Version data entries
10 entries across 10 versions & 2 rubygems