Sha256: e96d17c4821cedeafd8eb76cc83623970cc6fe1bbd2a15198bda9c3bd6699ede

Contents?: true

Size: 974 Bytes

Versions: 2

Compression:

Stored size: 974 Bytes

Contents

require 'rspec/core/formatters/base_formatter'
require 'rspectacles/adapter/redis_logger'

module RSpectacles
  module Formatter
    module Legacy
      class Redis < RSpec::Core::Formatters::BaseFormatter
        def initialize(_)
        end

        def logger
          @logger ||= RSpectacles::Adapter::RedisLogger.new
        end

        def message(message)
          logger.log "message:#{message}"
        end

        def start(example_count)
          logger.log 'status:start'
          logger.delete_last_log
        end

        def stop
          logger.log 'status:stop'
        end

        def example_started(example)
        end

        def example_passed(example)
          logger.log_formatted example
        end

        def example_pending(example)
          logger.log_formatted example
        end

        def example_failed(example)
          logger.log_formatted example
        end

        def close
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rspectacles-0.1.1 lib/rspectacles/formatter/legacy/redis.rb
rspectacles-0.1.0 lib/rspectacles/formatter/legacy/redis.rb