1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/railties/test/chdir_helpers.rb

12 lines
177 B
Ruby

# frozen_string_literal: true
module ChdirHelpers
private
def chdir(dir)
pwd = Dir.pwd
Dir.chdir(dir)
yield
ensure
Dir.chdir(pwd)
end
end