5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-22 12:36:21 +00:00
panel/test/test_helper.rb
2019-03-26 12:32:20 -03:00

17 lines
428 B
Ruby

# frozen_string_literal: true
require File.expand_path('../config/environment', __dir__)
require 'rails/test_help'
require 'open3'
class ActiveSupport::TestCase
# Resetear el repositorio a su estado original antes de leerlo
def reset_git_repo(path)
Dir.chdir(path) do
Open3.popen3('git reset --hard') do |_, _, _, thread|
# Wait for the process to finish
thread.value
end
end
end
end