/usr/lib/ruby/vendor_ruby/serverspec/matcher/be_monitored_by.rb is in ruby-serverspec 2.41.3-3.
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 | RSpec::Matchers.define :be_monitored_by do |monitor|
match do |service|
service.monitored_by?(monitor, @monitor_name)
end
description do
if @monitor_name
"be monitored by #{monitor} with name #{@monitor_name}"
else
"be monitored by #{monitor}"
end
end
chain :with_name do |name|
@monitor_name = (name ? name : nil)
end
end
|