Sha256: bd6ddea460a0f3b5a91f1397044614777be374e1f96b5d6639b537b6bf83587d

Contents?: true

Size: 1.15 KB

Versions: 30

Compression:

Stored size: 1.15 KB

Contents

require 'rubygems'
require 'specinfra'
require 'rspec'
require 'rspec/its'
require 'serverspec/version'
require 'serverspec/matcher'
require 'serverspec/helper'
require 'serverspec/setup'
require 'serverspec/subject'
require 'serverspec/commands/base'
require 'rspec/core/formatters/base_formatter'
require 'specinfra/helper/set'
include Specinfra::Helper::Set

module RSpec::Core::Notifications
  class FailedExampleNotification < ExampleNotification
    def failure_lines
      host = ENV['TARGET_HOST'] || Specinfra.configuration.host
      @failure_lines ||=
        begin
          lines = []
          lines << "On host `#{host}'" if host
          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

30 entries across 30 versions & 1 rubygems

Version Path
serverspec-2.21.0 lib/serverspec.rb
serverspec-2.20.0 lib/serverspec.rb
serverspec-2.19.0 lib/serverspec.rb
serverspec-2.18.0 lib/serverspec.rb
serverspec-2.17.1 lib/serverspec.rb
serverspec-2.17.0 lib/serverspec.rb
serverspec-2.16.0 lib/serverspec.rb
serverspec-2.15.0 lib/serverspec.rb
serverspec-2.14.1 lib/serverspec.rb
serverspec-2.14.0 lib/serverspec.rb
serverspec-2.13.0 lib/serverspec.rb
serverspec-2.12.0 lib/serverspec.rb
serverspec-2.11.0 lib/serverspec.rb
serverspec-2.10.2 lib/serverspec.rb
serverspec-2.10.1 lib/serverspec.rb
serverspec-2.10.0 lib/serverspec.rb
serverspec-2.9.1 lib/serverspec.rb
serverspec-2.9.0 lib/serverspec.rb
serverspec-2.8.2 lib/serverspec.rb
serverspec-2.8.1 lib/serverspec.rb