Sha256: 4188ed9b16b2033c46045e4fc4f2356cb5ab3fae5229e2ac3edc88177e0b3416

Contents?: true

Size: 807 Bytes

Versions: 8

Compression:

Stored size: 807 Bytes

Contents

module ATP
  module Formatters
    # Returns the executed flow as a string of test names. This
    # is mainly intended to be used for testing the runner.
    class Basic < Formatter
      def format(node, options = {})
        @output = ''
        process(node)
        @output
      end

      def on_test(node)
        if node.find(:name)
          @output += node.find(:name).value
        else
          @output += node.find(:object).value['Test']
        end
        @output += ' F' if node.find(:failed)
        @output += "\n"
      end

      def on_set_result(node)
        @output += node.to_a[0].upcase
        @output += " #{node.find(:bin).value}" if node.find(:bin)
        @output += " #{node.find(:softbin).value}" if node.find(:softbin)
        @output += "\n"
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
atp-0.8.0 lib/atp/formatters/basic.rb
atp-0.7.0 lib/atp/formatters/basic.rb
atp-0.6.0 lib/atp/formatters/basic.rb
atp-0.5.4 lib/atp/formatters/basic.rb
atp-0.5.3 lib/atp/formatters/basic.rb
atp-0.5.0 lib/atp/formatters/basic.rb
atp-0.4.3 lib/atp/formatters/basic.rb
atp-0.4.2 lib/atp/formatters/basic.rb