Sha256: 8d5039911f255105a9cef4856a55a411055d0dc22fb3a12e3bd316b1940dd25b

Contents?: true

Size: 525 Bytes

Versions: 15

Compression:

Stored size: 525 Bytes

Contents

module ATP
  module Processors
    # Makes sure every test node has an on_fail/set_result node,
    class AddSetResult < Processor
      def run(node)
        process(node)
      end

      def on_test(node)
        node = node.ensure_node_present(:on_fail)
        node.updated(nil, process_all(node))
      end

      def on_on_fail(node)
        unless node.find(:continue)
          node = node.ensure_node_present(:set_result, 'fail')
        end
        node.updated(nil, process_all(node))
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
atp-1.1.3 lib/atp/processors/add_set_result.rb
atp-1.1.2 lib/atp/processors/add_set_result.rb
atp-1.1.1 lib/atp/processors/add_set_result.rb
atp-1.1.0 lib/atp/processors/add_set_result.rb
atp-1.0.0 lib/atp/processors/add_set_result.rb
atp-0.8.0 lib/atp/processors/add_set_result.rb
atp-0.7.0 lib/atp/processors/add_set_result.rb
atp-0.6.0 lib/atp/processors/add_set_result.rb
atp-0.5.4 lib/atp/processors/add_set_result.rb
atp-0.5.3 lib/atp/processors/add_set_result.rb
atp-0.5.0 lib/atp/processors/add_set_result.rb
atp-0.4.3 lib/atp/processors/add_set_result.rb
atp-0.4.2 lib/atp/processors/add_set_result.rb
atp-0.4.1 lib/atp/processors/add_set_result.rb
atp-0.4.0 lib/atp/processors/add_set_result.rb