Class: HotCell::Fixtures::HalfWritten

Inherits:
Operation
  • Object
show all
Defined in:
lib/hot_cell/test_operations.rb

Overview

Writes the first output and leaves the second alone, which is a positive total and reads as success to anything checking the aggregate.

Constant Summary

Constants inherited from Operation

Operation::READ_BYTES

Instance Method Summary collapse

Methods inherited from Operation

abstract_operation, abstract_operation?, before_fork, before_worker_boot, inherited, limits, operation, operation_name, #run_tool, unreadable

Instance Method Details

#perform(_inputs, outputs) ⇒ Object



333
334
335
336
337
# File 'lib/hot_cell/test_operations.rb', line 333

def perform(_inputs, outputs)
  File.binwrite outputs.first.path, "only the first"

  { wrote: 1 }
end