/usr/lib/ruby/vendor_ruby/serverspec.rb is in ruby-serverspec 2.18.0-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | 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
|