X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/5f59845575ed313688eca669fd73f4f6a5993c23..71cbb003f8a8db1b077ebeefb776033a3e31ee9a:/test/controllers/traces_controller_test.rb diff --git a/test/controllers/traces_controller_test.rb b/test/controllers/traces_controller_test.rb index 84469437a..daa8a6787 100644 --- a/test/controllers/traces_controller_test.rb +++ b/test/controllers/traces_controller_test.rb @@ -2,23 +2,9 @@ require "test_helper" require "minitest/mock" class TracesControllerTest < ActionController::TestCase - def setup - @gpx_trace_dir = Object.send("remove_const", "GPX_TRACE_DIR") - Object.const_set("GPX_TRACE_DIR", Rails.root.join("test", "gpx", "traces")) - - @gpx_image_dir = Object.send("remove_const", "GPX_IMAGE_DIR") - Object.const_set("GPX_IMAGE_DIR", Rails.root.join("test", "gpx", "images")) - end - def teardown - File.unlink(*Dir.glob(File.join(GPX_TRACE_DIR, "*.gpx"))) - File.unlink(*Dir.glob(File.join(GPX_IMAGE_DIR, "*.gif"))) - - Object.send("remove_const", "GPX_TRACE_DIR") - Object.const_set("GPX_TRACE_DIR", @gpx_trace_dir) - - Object.send("remove_const", "GPX_IMAGE_DIR") - Object.const_set("GPX_IMAGE_DIR", @gpx_image_dir) + File.unlink(*Dir.glob(File.join(Settings.gpx_trace_dir, "*.gpx"))) + File.unlink(*Dir.glob(File.join(Settings.gpx_image_dir, "*.gif"))) end ##