Sha256: dac35d96c6b359fc8160884c442ed150fe92514439a99ab91be2308155950048

Contents?: true

Size: 715 Bytes

Versions: 4

Compression:

Stored size: 715 Bytes

Contents

require "teaspoon/formatter/base"

module Teaspoon
  module Formatter
    class Json < Base
      protected

        def log_runner(result)
          log_result(result)
        end

        def log_suite(result)
          log_result(result)
        end

        def log_spec(result)
          log_result(result)
        end

        def log_error(result)
          log_result(result)
        end

        def log_exception(result)
          log_result(result)
        end

        def log_console(message)
          log_line(%{{"type":"console","log":"#{message.gsub(/\n$/, '').gsub('\n', '\\n')}"}})
        end

        def log_result(result)
          log_str(result.original_json)
        end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
teaspoon-1.4.0 lib/teaspoon/formatter/json.rb
teaspoon-1.2.2 lib/teaspoon/formatter/json.rb
teaspoon-1.2.1 lib/teaspoon/formatter/json.rb
teaspoon-1.2.0 lib/teaspoon/formatter/json.rb