Class: Strata::CLI::Generators::Test
- Defined in:
- lib/strata/cli/generators/test.rb
Overview
Generates test YAML files from templates.
Instance Method Summary collapse
Methods inherited from Group
Instance Method Details
#create_test_file ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/strata/cli/generators/test.rb', line 13 def create_test_file output_path = File.join("tests", "#{slugify(name)}.yml") # Ensure directory exists empty_directory "tests" # Load template and update with user inputs template_content = load_template updated_content = update_template(template_content) # Write the updated template create_file output_path, updated_content say_status :created, output_path, :green end |