/usr/lib/ruby/vendor_ruby/rspec/support/spec/with_isolated_directory.rb is in ruby-rspec-support 3.5.0c3e0m0s0-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 | require 'tmpdir'
RSpec.shared_context "isolated directory" do
around do |ex|
Dir.mktmpdir do |tmp_dir|
Dir.chdir(tmp_dir, &ex)
end
end
end
RSpec.configure do |c|
c.include_context "isolated directory", :isolated_directory => true
end
|