/usr/lib/ruby/vendor_ruby/cheffish/rspec/matchers/emit_no_warnings_or_errors.rb is in ruby-cheffish 4.0.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 | require 'rspec/matchers'
RSpec::Matchers.define :emit_no_warnings_or_errors do
match do |recipe|
@recipe = recipe
@warn_err = recipe.logs.lines.select { |l| l =~ /warn|err/i }.join("\n")
@warn_err.empty?
end
failure_message {
"#{@recipe} emitted warnings and errors!\n#{@warn_err}"
}
supports_block_expectations
end
|