Sha256: b11d8b94792ed6742e5d268e5b4c428db0e44a66ccc6599ecf031e22de1808d5
Contents?: true
Size: 455 Bytes
Versions: 4
Compression:
Stored size: 455 Bytes
Contents
module ATP module Processors # Assigns an ID to all test nodes that don't have one class AddIDs < Processor def run(node) @i = 0 process(node) end def on_test(node) @i += 1 node = node.ensure_node_present(:id) node.updated(nil, process_all(node)) end def on_id(node) unless node.value node.updated(nil, ["t#{@i}"]) end end end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
atp-0.3.3 | lib/atp/processors/add_ids.rb |
atp-0.3.2 | lib/atp/processors/add_ids.rb |
atp-0.3.1 | lib/atp/processors/add_ids.rb |
atp-0.3.0 | lib/atp/processors/add_ids.rb |