/usr/lib/ruby/vendor_ruby/cheffish/rspec/matchers/be_idempotent.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 16 | require 'rspec/matchers'
RSpec::Matchers.define :be_idempotent do
match do |recipe|
@recipe = recipe
recipe.reset
recipe.converge
recipe.up_to_date?
end
failure_message {
"#{@recipe} is not idempotent! Converging it a second time caused updates.\n#{@recipe.output_for_failure_message}"
}
supports_block_expectations
end
|