Sha256: 0a96aac6bbf796c84731e6a18993dff90c5474d03cd5e8c1c34bd47c3449931c

Contents?: true

Size: 985 Bytes

Versions: 3

Compression:

Stored size: 985 Bytes

Contents

require 'rubygems'
require 'specinfra'
require 'rspec'
require 'rspec/its'
require 'serverspec/version'
require 'serverspec/matchers'
require 'serverspec/helper'
require 'serverspec/setup'
require 'serverspec/subject'
require 'serverspec/commands/base'
require 'rspec/core/formatters/base_formatter'

module RSpec::Core::Notifications
  class FailedExampleNotification < ExampleNotification
    def failure_lines
      @failure_lines ||=
        begin
          lines = ["Failure/Error: #{read_failed_line.strip}"]
          lines << "#{exception_class_name}:" unless exception_class_name =~ /RSpec/
          exception.message.to_s.split("\n").each do |line|
          lines << "  #{line}" if exception.message
        end
          lines << "  #{example.metadata[:command]}"
          lines << "  #{example.metadata[:stdout]}" if example.metadata[:stdout]
          lines << "  #{example.metadata[:stderr]}" if example.metadata[:stderr]
          lines
        end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
serverspec-2.0.0.beta16 lib/serverspec.rb
serverspec-2.0.0.beta15 lib/serverspec.rb
serverspec-2.0.0.beta14 lib/serverspec.rb