diff options
Diffstat (limited to 'spec/spec_helper.rb')
-rw-r--r-- | spec/spec_helper.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 25759ca50b8..52560f1f1c3 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -475,3 +475,14 @@ Rugged::Settings['search_path_global'] = Rails.root.join('tmp/tests').to_s # Initialize FactoryDefault to use create_default helper TestProf::FactoryDefault.init + +module TouchRackUploadedFile + def initialize_from_file_path(path) + super + + # This is a no-op workaround for https://github.com/docker/for-linux/issues/1015 + File.utime @tempfile.atime, @tempfile.mtime, @tempfile.path # rubocop:disable Gitlab/ModuleWithInstanceVariables + end +end + +Rack::Test::UploadedFile.prepend(TouchRackUploadedFile) |