Sha256: d49d4040480f4ef9a7ad2170548c2745272c14843a374811bea41f4d486c951e

Contents?: true

Size: 641 Bytes

Versions: 1

Compression:

Stored size: 641 Bytes

Contents

module LookOut
  module RSpec
    class LookOutFormatter < ::RSpec::Core::Formatters::JsonFormatter
      ::RSpec::Core::Formatters.register self, :close

      def close(_notification)
        output_hash[:examples].each do |example|
          %i(description full_description line_number pending_message file_path).each do |key|
            example.delete(key)
          end
        end

        LookOut::Cast.create(
          user: LookOut.config.user,
          data: output_hash,
          repo: LookOut.config.repo,
          sha: `git log -1 --format=%H`.chomp,
          env: LookOut.config.env
        )
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
look_out-0.1.0 lib/look_out/rspec/look_out_formatter.rb