Class: Ace::Test::EndToEndRunner::Molecules::FixtureCopier
- Inherits:
-
Object
- Object
- Ace::Test::EndToEndRunner::Molecules::FixtureCopier
- Defined in:
- lib/ace/test/end_to_end_runner/molecules/fixture_copier.rb
Overview
Copies fixture files from a scenario’s fixtures/ directory into a sandbox
Preserves the full directory tree structure. Used by SetupExecutor to populate sandboxes with test data files.
Note: This is a Molecule (not an Atom) because it performs filesystem I/O via FileUtils.cp_r and Dir.glob.
Instance Method Summary collapse
-
#copy(source_dir:, target_dir:) ⇒ Array<String>
Copy fixture tree into target directory.
Instance Method Details
#copy(source_dir:, target_dir:) ⇒ Array<String>
Copy fixture tree into target directory
23 24 25 26 27 28 29 30 |
# File 'lib/ace/test/end_to_end_runner/molecules/fixture_copier.rb', line 23 def copy(source_dir:, target_dir:) raise ArgumentError, "Fixture source directory not found: #{source_dir}" unless Dir.exist?(source_dir) FileUtils.mkdir_p(target_dir) FileUtils.cp_r("#{source_dir}/.", target_dir) Dir.glob("**/*", base: target_dir).sort end |