Sha256: 126127c6d2cf10fbdc2dc23bd0713663bc319c2b919b39cd43a20d53146f3b34

Contents?: true

Size: 948 Bytes

Versions: 9

Compression:

Stored size: 948 Bytes

Contents

require "teaspoon/formatter/base"

module Teaspoon
  module Formatter
    class Tap < Base
      protected

      def log_runner(_result)
        log_line("1..#{@total_count}")
      end

      def log_passing_spec(result)
        log_line("ok #{@run_count} - #{result.description}")
      end

      def log_pending_spec(result)
        log_line("ok #{@run_count} - [pending] #{result.description}")
      end

      def log_failing_spec(result)
        log_line("not ok #{@run_count} - #{result.description}")
        log_line("  FAIL #{result.message}")
      end

      def log_console(message)
        log_line("# #{message.gsub(/\n$/, '')}")
      end

      def log_coverage(message)
        log_line("# #{message.gsub(/\n/, "\n# ")}")
      end

      def log_threshold_failure(message)
        log_line("not ok #{@run_count + 1} - Coverage threshold failed")
        log_line("# #{message.gsub(/\n/, "\n# ")}")
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
teaspoon-1.1.5 lib/teaspoon/formatter/tap.rb
teaspoon-1.1.4 lib/teaspoon/formatter/tap.rb
teaspoon-1.1.3 lib/teaspoon/formatter/tap.rb
teaspoon-1.1.2 lib/teaspoon/formatter/tap.rb
teaspoon-1.1.1 lib/teaspoon/formatter/tap.rb
teaspoon-1.1.0 lib/teaspoon/formatter/tap.rb
teaspoon-1.0.2 lib/teaspoon/formatter/tap.rb
teaspoon-1.0.1 lib/teaspoon/formatter/tap.rb
teaspoon-1.0.0 lib/teaspoon/formatter/tap.rb